ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilRSSButtonGUI.php
Go to the documentation of this file.
1 <?php
2 
23 {
24  public const ICON_RSS = "rss";
25  public const ICON_RSS_AUDIO = "rss audio";
26  public const ICON_RSS_VIDEO = "rss video";
27  public const ICON_ICAL = "ical";
28  public const ICON_ITUNES = "itunes";
29  public const ICON_ITUNES_AUDIO = "itunes audio";
30  public const ICON_ITUNES_VIDEO = "itunes video";
31 
39  public static function get(
40  string $a_type,
41  string $a_href = ""
42  ): string {
43  $tpl = new ilTemplate("tpl.rss_icon.html", true, true, "Services/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 
59  case self::ICON_RSS_AUDIO:
60  $text = "RSS Audio";
61  break;
62 
63  case self::ICON_RSS_VIDEO:
64  $text = "RSS Video";
65  break;
66 
67  case self::ICON_ICAL:
68  $text = "iCal";
69  break;
70 
71  case self::ICON_ITUNES:
72  $text = "iTunes";
73  break;
74 
75  case self::ICON_ITUNES_AUDIO:
76  $text = "iTunes Audio";
77  break;
78 
79  case self::ICON_ITUNES_VIDEO:
80  $text = "iTunes Video";
81  break;
82  }
83 
84  $tpl->setVariable("TEXT", $text);
85 
86  return $tpl->get();
87  }
88 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41