118 $this->
assert()->isIndex(
'id', $entry_data);
119 $this->
setId($entry_data[
'id']);
120 $this->
assert()->isIndex(
'title', $entry_data);
121 $this->
setTitle($entry_data[
'title']);
122 $this->
assert()->isIndex(
'abstract', $entry_data);
126 if (array_key_exists(
'description', $entry_data)) {
129 if (array_key_exists(
'rules', $entry_data)) {
133 $this->
assert()->isIndex(
'path', $entry_data);
134 $this->
setPath($entry_data[
'path']);
136 if (array_key_exists(
'background', $entry_data)) {
139 if (array_key_exists(
'context', $entry_data)) {
142 if (array_key_exists(
'featurewiki', $entry_data)) {
145 if (array_key_exists(
'parent', $entry_data)) {
148 if (array_key_exists(
'children', $entry_data)) {
258 return $this->description->getDescription();
267 $this->
assert()->isTypeOf($description, ComponentEntryDescription::class);
337 return $this->rules->getRules();
348 $this->
assert()->isTypeOf(
$rules, ComponentEntryRules::class);
440 $this->children[] = $child;
464 $this->examples = array();
466 if (is_dir($case_insensitive_path)) {
467 foreach (scandir($case_insensitive_path) as $file_name) {
469 if (is_file($example_path) && pathinfo($example_path)[
"extension"] ==
"php") {
470 $example_name = str_replace(
".php",
"", $file_name);
471 $this->examples[$example_name] = $example_path;
486 if (is_dir($parent_folder)) {
487 foreach (scandir($parent_folder) as $folder_name) {
488 if (strtolower($folder_name) == strtolower(basename($this->
getExamplesPath()))) {
489 return $parent_folder .
"/" . $folder_name;
499 if (!$this->examples_path) {
500 $path_componants = str_replace(
"Component",
"examples", $this->
getPath())
501 .
"/" . str_replace(
" ",
"", $this->
getTitle());
502 $path_array = self::array_iunique(explode(
"/", $path_componants));
503 $this->examples_path = implode(
"/", $path_array);
515 return array_intersect_key(
517 array_unique(array_map(
"StrToLower", $array))
529 $description_serialized =
$description->jsonSerialize();
531 $description_serialized =
"";
536 $rules_serialized =
$rules->jsonSerialize();
538 $rules_serialized =
"";
541 'id' => $this->
getId(),
546 'description' => $description_serialized,
551 'rules' => $rules_serialized,
Container to hold rules of UI Components.
setBackground($background)
Abstract Entry Part to share some common entry functionality.
setDescription(ComponentEntryDescription $description)
setStatusImplementation($status_implementation)
__construct($entry_data)
ComponentEntry constructor.
$status_list_implementation
setFeatureWikiReferences($feature_wiki_references)
getFeatureWikiReferences()
getCaseInsensitiveExampleFolder()
Note case handling of is dir is different from OS to OS, therefore while reading the examples from th...
setStatusEntry($status_entry)
Stores Information of UI Components parsed from YAML, examples and less files.
getStatusImplementation()
__construct(Container $dic, ilPlugin $plugin)
setLessVariables($less_variables)
Container to hold description of UI Components.
static array_iunique($array)
setIsAbstract($is_abstract)