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());
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,
An exception for terminatinating execution or to throw for unit testing.
Abstract Entry Part to share some common entry functionality.
Container to hold description of UI Components.
Container to hold rules of UI Components.
Stores Information of UI Components parsed from YAML, examples and less files.
setFeatureWikiReferences($feature_wiki_references)
setStatusImplementation($status_implementation)
getStatusImplementation()
setBackground($background)
setDescription(ComponentEntryDescription $description)
setStatusEntry($status_entry)
getFeatureWikiReferences()
getCaseInsensitiveExampleFolder()
Note case handling of is dir is different from OS to OS, therefore while reading the examples from th...
setLessVariables($less_variables)
__construct($entry_data)
ComponentEntry constructor.
setIsAbstract($is_abstract)
static array_iunique($array)
$status_list_implementation
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc