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");
55 $this->f = $DIC->ui()->factory();
56 $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(
"Description",
79 $this->f->listing()->descriptive(
81 "Purpose" => $this->entry->getDescription()->getProperty(
"purpose"),
82 "Composition" => $this->entry->getDescription()->getProperty(
"composition"),
83 "Effect" => $this->entry->getDescription()->getProperty(
"effect"),
84 "Rivals" => $this->f->listing()->ordered(
85 $this->entry->getDescription()->getProperty(
"rivals")
89 $this->f->listing()->descriptive(
91 "Background" => $this->entry->getBackground(),
92 "Feature Wiki References" => $this->f->listing()->ordered($feature_wiki_links)
98 $rule_listings =
array();
99 foreach($this->entry->getRulesAsArray() as $categoery => $category_rules){
100 $rule_listings[ucfirst($categoery)] = $this->f->listing()->ordered($category_rules);
103 $sub_panels[] = $this->f->panel()->sub(
"Rules",
104 $this->f->listing()->descriptive($rule_listings)
107 if($this->entry->getExamples()){
109 foreach($this->entry->getExamples() as $name =>
$path){
111 $title =
"Example ".$nr.
": ".ucfirst(str_replace(
"_",
" ",$name));
113 $example =
"<div class='well'>".$name().
"</div>";
114 $content_part_1 = $this->f->legacy($example);
115 $code = str_replace(
"<?php\n",
"",file_get_contents (
$path));
117 $content_part_2 = $this->f->legacy(
$geshi->parse_code());
118 $content =
array($content_part_1,$content_part_2);
119 $sub_panels[] = $this->f->panel()->sub(
$title, $content);
123 $sub_panels[] = $this->f->panel()->sub(
"Relations",
124 $this->f->listing()->descriptive(
126 "Parents" => $this->f->listing()->ordered(
127 $this->entries->getParentsOfEntryTitles($this->entry->getId())
129 "Descendants" => $this->f->listing()->unordered(
130 $this->entries->getDescendantsOfEntryTitles($this->entry->getId())
136 $report = $this->f->panel()->report($this->entry->getTitle(),$sub_panels);
138 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)
Create styles array
The data for the language used.