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();
62 $this->ctrl = $DIC->ctrl();
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"),
88 $this->f->listing()->descriptive(
90 "Background" => $this->entry->getBackground(),
91 "Context" => $this->f->listing()->ordered($this->entry->getContext()),
92 "Feature Wiki References" => $this->f->listing()->ordered($feature_wiki_links)
98 if (
sizeof($this->entry->getDescription()->getProperty(
"rivals"))) {
99 $sub_panels[] = $this->f->panel()->sub(
101 $this->f->listing()->descriptive(
102 $this->entry->getDescription()->getProperty(
"rivals")
107 if ($this->entry->getRules()->hasRules()) {
108 $rule_listings = array();
109 foreach ($this->entry->getRulesAsArray() as $categoery => $category_rules) {
110 $rule_listings[ucfirst($categoery)] = $this->f->listing()->ordered($category_rules);
114 $sub_panels[] = $this->f->panel()->sub(
116 $this->f->listing()->descriptive($rule_listings)
121 if ($this->entry->getExamples()) {
123 foreach ($this->entry->getExamples() as
$name =>
$path) {
125 $title =
"Example " . $nr .
": " . ucfirst(str_replace(
"_",
" ", $name));
127 $example =
"<div class='well'>" .
$name() .
"</div>";
128 $content_part_1 = $this->f->legacy($example);
129 $code = str_replace(
"<?php\n",
"", file_get_contents(
$path));
131 $content_part_2 = $this->f->legacy(
$geshi->parse_code());
132 $content = array($content_part_1,$content_part_2);
133 $sub_panels[] = $this->f->panel()->sub(
$title, $content);
137 $sub_panels[] = $this->f->panel()->sub(
139 $this->f->listing()->descriptive(
141 "Parents" => $this->f->listing()->ordered(
142 $this->entries->getParentsOfEntryTitles($this->entry->getId())
144 "Descendants" => $this->f->listing()->unordered(
145 $this->entries->getDescendantsOfEntryTitles($this->entry->getId())
151 $report = $this->f->panel()->report($this->entry->getTitle(), $sub_panels);
153 return $this->r->render($report);
if(strncmp($real_path, SOURCE_ROOT, $base_path_len)) if(!file_exists($path)) $geshi
__construct(ilSystemStyleDocumentationGUI $parent, Entry\ComponentEntry $entry, Entry\ComponentEntries $entries)
ilKSDocumentationEntryGUI constructor.
setEntries(Entry\ComponentEntries $entries)
setEntry(Entry\ComponentEntry $entry)