37 $entries =
new self();
38 $entries->addEntriesFromArray($entries_array);
51 if (
count($this) == 0) {
54 $this->id_to_entry_map[$entry->
getId()] = $entry;
63 foreach ($entries as $entry) {
74 foreach ($entries as $entry_array) {
110 if (array_key_exists($id, $this->id_to_entry_map)) {
111 return $this->id_to_entry_map[$id];
113 throw $this->f->exception(
Crawler\
Exception\CrawlerException::INVALID_ID, $id);
128 array_push($parents, $parent_id);
141 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
153 foreach ($this->
getEntryById($id)->getChildren() as $child) {
167 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
174 return get_object_vars($this);
184 return current($this->id_to_entry_map) !==
false;
192 return key($this->id_to_entry_map);
200 return current($this->id_to_entry_map);
205 next($this->id_to_entry_map);
209 reset($this->id_to_entry_map);
217 return count($this->id_to_entry_map);
228 foreach ($this->id_to_entry_map as $id => $item) {
229 $serialized[$id] = $item->jsonSerialize();
getDescendantsOfEntry($id)
Abstract Entry Part to share some common entry functionality.
addEntriesFromArray(array $entries)
static createFromArray(array $entries_array)
getDescendantsOfEntryTitles($id)
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable...
valid()
Iterator implementations.
getParentsOfEntryTitles($id)
__construct()
ComponentEntries constructor.
jsonSerialize()
jsonSerialize implementation
Stores Information of UI Components parsed from YAML, examples and less files.
count()
Countable implementations.
addEntry(ComponentEntry $entry)
Add and entry, first is always root.
addEntries(ComponentEntries $entries)
__construct(Container $dic, ilPlugin $plugin)
setRootEntryId($root_entry_id)