ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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, "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 }
88}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR