ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
49  case self::ICON_RSS_AUDIO:
50  $text = "RSS Audio";
51  break;
52 
53  case self::ICON_RSS_VIDEO:
54  $text = "RSS Video";
55  break;
56 
57  case self::ICON_ICAL:
58  $text = "iCal";
59  break;
60 
61  case self::ICON_ITUNES:
62  $text = "iTunes";
63  break;
64 
65  case self::ICON_ITUNES_AUDIO:
66  $text = "iTunes Audio";
67  break;
68 
69  case self::ICON_ITUNES_VIDEO:
70  $text = "iTunes Video";
71  break;
72  }
73 
74  $tpl->setVariable("TEXT", $text);
75 
76  return $tpl->get();
77  }
78 
79 }
80 
81 ?>