mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
44 lines
821 B
PHP
44 lines
821 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @package Widgets
|
||
|
*
|
||
|
* @file Pods.php
|
||
|
* This file is part of Movim.
|
||
|
*
|
||
|
* @brief The Pods widget
|
||
|
*
|
||
|
* @author Jaussoin Timothée <edhelas@movim.eu>
|
||
|
|
||
|
* Copyright (C)2014 Movim project
|
||
|
*
|
||
|
* See COPYING for licensing information.
|
||
|
*/
|
||
|
|
||
|
class Pods extends WidgetBase
|
||
|
{
|
||
|
function load() {
|
||
|
|
||
|
}
|
||
|
|
||
|
function flagPath($country) {
|
||
|
return BASE_URI.'themes/material/img/flags/'.strtolower($country).'.png';
|
||
|
}
|
||
|
|
||
|
function countryName($code) {
|
||
|
$list = getCountries();
|
||
|
$code = strtoupper($code);
|
||
|
return $list[$code];
|
||
|
}
|
||
|
|
||
|
function display()
|
||
|
{
|
||
|
$json = requestURL(MOVIM_API.'pods', 1);
|
||
|
$json = json_decode($json);
|
||
|
|
||
|
if(is_object($json) && $json->status == 200) {
|
||
|
$this->view->assign('pods', $json);
|
||
|
}
|
||
|
}
|
||
|
}
|