ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilRSSButtonGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
14 const ICON_RSS = "rss";
15 const ICON_RSS_AUDIO = "rss audio";
16 const ICON_RSS_VIDEO = "rss video";
17 const ICON_ICAL = "ical";
18 const ICON_ITUNES = "itunes";
19 const ICON_ITUNES_AUDIO = "itunes audio";
20 const ICON_ITUNES_VIDEO = "itunes video";
21
29 static function get($a_type, $a_href = "")
30 {
31 $tpl = new ilTemplate("tpl.rss_icon.html", true, true, "Services/News");
32
33 if ($a_href != "")
34 {
35 $tpl->setCurrentBlock("a_start");
36 $tpl->setVariable("HREF", $a_href);
37 $tpl->parseCurrentBlock();
38 $tpl->touchBlock("a_end");
39 }
40
41 $text = "";
42
43 switch ($a_type)
44 {
45 case self::ICON_RSS:
46 $text = "RSS";
47 break;
48
50 $text = "RSS Audio";
51 break;
52
54 $text = "RSS Video";
55 break;
56
57 case self::ICON_ICAL:
58 $text = "iCal";
59 break;
60
62 $text = "iTunes";
63 break;
64
66 $text = "iTunes Audio";
67 break;
68
70 $text = "iTunes Video";
71 break;
72 }
73
74 $tpl->setVariable("TEXT", $text);
75
76 return $tpl->get();
77 }
78
79}
80
81?>
global $tpl
Definition: ilias.php:8
special template class to simplify handling of ITX/PEAR
$text