ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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);
48 $tpl->parseCurrentBlock();
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

References ICON_ICAL, ICON_ITUNES, ICON_ITUNES_AUDIO, ICON_ITUNES_VIDEO, ICON_RSS, ICON_RSS_AUDIO, and ICON_RSS_VIDEO.

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: