ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilRSSButtonGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilRSSButtonGUI:

Static Public Member Functions

static get (string $a_type, string $a_href="")
 Get icon html. More...
 

Data Fields

const ICON_RSS = "rss"
 
const ICON_RSS_AUDIO = "rss audio"
 
const ICON_RSS_VIDEO = "rss video"
 
const ICON_ICAL = "ical"
 
const ICON_ITUNES = "itunes"
 
const ICON_ITUNES_AUDIO = "itunes audio"
 
const ICON_ITUNES_VIDEO = "itunes video"
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 22 of file class.ilRSSButtonGUI.php.

Member Function Documentation

◆ get()

static ilRSSButtonGUI::get ( string  $a_type,
string  $a_href = "" 
)
static

Get icon html.

Parameters
string$a_typeicons type ICON_RSS | ICON_ICAL
string$a_hrefhref
Returns
string icon html

Definition at line 39 of file class.ilRSSButtonGUI.php.

42 : string {
43 $tpl = new ilTemplate("tpl.rss_icon.html", true, true, "components/ILIAS/News");
44
45 if ($a_href !== "") {
46 $tpl->setCurrentBlock("a_start");
47 $tpl->setVariable("HREF", $a_href);
49 $tpl->touchBlock("a_end");
50 }
51
52 $text = "";
53
54 switch ($a_type) {
55 case self::ICON_RSS:
56 $text = "RSS";
57 break;
58
60 $text = "RSS Audio";
61 break;
62
64 $text = "RSS Video";
65 break;
66
67 case self::ICON_ICAL:
68 $text = "iCal";
69 break;
70
72 $text = "iTunes";
73 break;
74
76 $text = "iTunes Audio";
77 break;
78
80 $text = "iTunes Video";
81 break;
82 }
83
84 $tpl->setVariable("TEXT", $text);
85
86 return $tpl->get();
87 }
special template class to simplify handling of ITX/PEAR
setVariable(string $variable, $value='')
Sets the given variable to the given value.
touchBlock(string $block)
overwrites ITX::touchBlock.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
readonly ilGlobalTemplateInterface $tpl
$text
Definition: xapiexit.php:21

References $text, ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\get(), ICON_ICAL, ICON_ITUNES, ICON_ITUNES_AUDIO, ICON_ITUNES_VIDEO, ICON_RSS, ICON_RSS_AUDIO, ICON_RSS_VIDEO, ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ILIAS\UICore\GlobalTemplate\touchBlock().

+ Here is the call graph for this function:

Field Documentation

◆ ICON_ICAL

const ilRSSButtonGUI::ICON_ICAL = "ical"

Definition at line 27 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_ITUNES

const ilRSSButtonGUI::ICON_ITUNES = "itunes"

Definition at line 28 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_ITUNES_AUDIO

const ilRSSButtonGUI::ICON_ITUNES_AUDIO = "itunes audio"

Definition at line 29 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_ITUNES_VIDEO

const ilRSSButtonGUI::ICON_ITUNES_VIDEO = "itunes video"

Definition at line 30 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_RSS

const ilRSSButtonGUI::ICON_RSS = "rss"

Definition at line 24 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_RSS_AUDIO

const ilRSSButtonGUI::ICON_RSS_AUDIO = "rss audio"

Definition at line 25 of file class.ilRSSButtonGUI.php.

Referenced by get().

◆ ICON_RSS_VIDEO

const ilRSSButtonGUI::ICON_RSS_VIDEO = "rss video"

Definition at line 26 of file class.ilRSSButtonGUI.php.

Referenced by get().


The documentation for this class was generated from the following file: