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());
403 $path_array = self::array_iunique(explode(
"/", $path_components));
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,
if($err=$client->getError()) $namespace
Container to hold rules of UI Components.
setNamespace(string $namespace)
Abstract Entry Part to share some common entry functionality.
setStatusImplementation(string $status_implementation)
setDescription(ComponentEntryDescription $description)
__construct($entry_data)
ComponentEntry constructor.
$status_list_implementation
getFeatureWikiReferences()
getCaseInsensitiveExampleFolder()
Note case handling of is dir is different from OS to OS, therefore while reading the examples from th...
setBackground(string $background)
setRules(ComponentEntryRules $rules)
Stores Information of UI Components parsed from YAML, examples and less files.
setParent(string $parent)
setIsAbstract(bool $is_abstract)
setSelector(string $selector)
getStatusImplementation()
setStatusEntry(string $status_entry)
setLessVariables(array $less_variables)
setContext(array $context)
__construct(Container $dic, ilPlugin $plugin)
Container to hold description of UI Components.
setFeatureWikiReferences(array $feature_wiki_references)
static array_iunique(array $array)