Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* Contains class core_tag\output\tagfeed
*
* @package core_tag
* @copyright 2015 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_tag\output;
use templatable;
use renderer_base;
use stdClass;
/**
* Class to display feed of tagged items
*
* @package core_tag
* @copyright 2015 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tagfeed implements templatable {
/** @var array */
protected $items;
/**
* Constructor
*
* Usually the most convenient way is to call constructor without arguments and
* add items later using add() method.
*
* @param array $items
*/
public function __construct($items = array()) {
$this->items = array();
if ($items) {
foreach ($items as $item) {
$item = (array)$item + array('img' => '', 'heading' => '', 'details' => '');
$this->add($item['img'], $item['heading'], $item['details']);
}
}
}
/**
* Adds one item to the tagfeed
*
* @param string $img HTML code representing image (or image wrapped in a link), note that
* core_tag/tagfeed template expects image to be 35x35 px
* @param string $heading HTML for item heading
* @param string $details HTML for item details (keep short)
*/
public function add($img, $heading, $details = '') {
$this->items[] = array('img' => $img, 'heading' => $heading, 'details' => $details);
}
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param renderer_base $output
* @return stdClass
*/
public function export_for_template(renderer_base $output) {
return array('items' => $this->items);
}
}