2 include_once(
"./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
3 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
4 include_once(
"libs/composer/vendor/geshi/geshi/src/geshi.php");
56 $this->f = $DIC->ui()->factory();
57 $this->r = $DIC->ui()->renderer();
70 $sub_panels =
array();
72 $feature_wiki_links =
array();
73 foreach ($this->entry->getFeatureWikiReferences()as $href) {
74 $feature_wiki_links[] = $href;
77 $sub_panels[] = $this->f->panel()->sub(
80 $this->f->listing()->descriptive(
82 "Purpose" => $this->entry->getDescription()->getProperty(
"purpose"),
83 "Composition" => $this->entry->getDescription()->getProperty(
"composition"),
84 "Effect" => $this->entry->getDescription()->getProperty(
"effect"),
85 "Rivals" => $this->f->listing()->ordered(
86 $this->entry->getDescription()->getProperty(
"rivals")
90 $this->f->listing()->descriptive(
92 "Background" => $this->entry->getBackground(),
93 "Feature Wiki References" => $this->f->listing()->ordered($feature_wiki_links)
99 $rule_listings =
array();
100 foreach ($this->entry->getRulesAsArray() as $categoery => $category_rules) {
101 $rule_listings[ucfirst($categoery)] = $this->f->listing()->ordered($category_rules);
104 $sub_panels[] = $this->f->panel()->sub(
106 $this->f->listing()->descriptive($rule_listings)
109 if ($this->entry->getExamples()) {
111 foreach ($this->entry->getExamples() as
$name =>
$path) {
113 $title =
"Example " . $nr .
": " . ucfirst(str_replace(
"_",
" ", $name));
115 $example =
"<div class='well'>" .
$name() .
"</div>";
116 $content_part_1 = $this->f->legacy($example);
117 $code = str_replace(
"<?php\n",
"", file_get_contents(
$path));
119 $content_part_2 = $this->f->legacy($geshi->parse_code());
120 $content =
array($content_part_1,$content_part_2);
121 $sub_panels[] = $this->f->panel()->sub(
$title, $content);
125 $sub_panels[] = $this->f->panel()->sub(
127 $this->f->listing()->descriptive(
129 "Parents" => $this->f->listing()->ordered(
130 $this->entries->getParentsOfEntryTitles($this->entry->getId())
132 "Descendants" => $this->f->listing()->unordered(
133 $this->entries->getDescendantsOfEntryTitles($this->entry->getId())
139 $report = $this->f->panel()->report($this->entry->getTitle(), $sub_panels);
141 return $this->r->render($report);
__construct(ilSystemStyleDocumentationGUI $parent, Entry\ComponentEntry $entry, Entry\ComponentEntries $entries)
ilKSDocumentationEntryGUI constructor.
setEntries(Entry\ComponentEntries $entries)
setEntry(Entry\ComponentEntry $entry)
Create styles array
The data for the language used.