115 $this->
assert()->isIndex(
'id', $entry_data);
116 $this->
setId($entry_data[
'id']);
117 $this->
assert()->isIndex(
'title', $entry_data);
118 $this->
setTitle($entry_data[
'title']);
119 $this->
assert()->isIndex(
'abstract', $entry_data);
123 if (array_key_exists(
'description', $entry_data)) {
126 if (array_key_exists(
'rules', $entry_data)) {
130 $this->
assert()->isIndex(
'path', $entry_data);
131 $this->
setPath($entry_data[
'path']);
133 if (array_key_exists(
'background', $entry_data)) {
136 if (array_key_exists(
'context', $entry_data)) {
139 if (array_key_exists(
'featurewiki', $entry_data)) {
142 if (array_key_exists(
'parent', $entry_data)) {
145 if (array_key_exists(
'children', $entry_data)) {
161 $this->
assert()->isString($id,
false);
172 $this->
assert()->isString($title,
false);
193 $this->
assert()->isString($status_entry);
204 $this->
assert()->isString($status_implementation);
219 return $this->description->getDescription();
228 $this->
assert()->isTypeOf($description, ComponentEntryDescription::class);
239 $this->
assert()->isString($background);
250 $this->
assert()->isArray($context);
261 $this->
assert()->isArray($feature_wiki_references);
273 return $this->rules->getRules();
281 $this->
assert()->isTypeOf($rules, ComponentEntryRules::class);
292 $this->
assert()->isString($selector);
298 $this->
assert()->isArray($less_variables);
314 $this->
assert()->isString($path);
346 $this->children[] = $child;
364 $this->examples = array();
366 if (is_dir($case_insensitive_path)) {
367 foreach (scandir($case_insensitive_path) as $file_name) {
369 if (is_file($example_path) && pathinfo($example_path)[
"extension"] ==
"php") {
370 $example_name = str_replace(
".php",
"", $file_name);
371 $this->examples[$example_name] = $example_path;
386 if (is_dir($parent_folder)) {
387 foreach (scandir($parent_folder) as $folder_name) {
388 if (strtolower($folder_name) == strtolower(basename($this->
getExamplesPath()))) {
389 return $parent_folder .
"/" . $folder_name;
399 if (!$this->examples_path) {
401 str_replace(
"Component",
"examples", $this->
getPath())
402 .
"/" . str_replace(
" ",
"", $this->
getTitle());
404 $this->examples_path = implode(
"/", $path_array);
412 if (!$this->examples_namespace) {
413 $this->examples_namespace = str_replace(
419 return $this->examples_namespace;
424 return $this->namesapce;
434 return array_intersect_key(
436 array_unique(array_map(
"StrToLower", $array))
444 $description_serialized =
$description->jsonSerialize();
446 $description_serialized =
"";
451 $rules_serialized =
$rules->jsonSerialize();
453 $rules_serialized =
"";
456 'id' => $this->
getId(),
461 'description' => $description_serialized,
466 '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.
setLessVariables(array $less_variables)
getStatusImplementation()
setFeatureWikiReferences(array $feature_wiki_references)
setIsAbstract(bool $is_abstract)
setStatusEntry(string $status_entry)
setContext(array $context)
setStatusImplementation(string $status_implementation)
setBackground(string $background)
setDescription(ComponentEntryDescription $description)
getFeatureWikiReferences()
getCaseInsensitiveExampleFolder()
Note case handling of is dir is different from OS to OS, therefore while reading the examples from th...
static array_iunique(array $array)
setNamespace(string $namespace)
setSelector(string $selector)
__construct($entry_data)
ComponentEntry constructor.
$status_list_implementation
setRules(ComponentEntryRules $rules)
setParent(string $parent)
if($err=$client->getError()) $namespace
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc