31 parent::__construct();
43 $this->
assert()->isNotIndex($entry->
getId(), $this->id_to_entry_map);
44 if (
count($this) == 0) {
47 $this->id_to_entry_map[$entry->
getId()] = $entry;
56 foreach ($entries as $entry) {
92 if (array_key_exists(
$id, $this->id_to_entry_map)) {
93 return $this->id_to_entry_map[
$id];
95 throw $this->f->exception(
Crawler\Exception\CrawlerException::INVALID_ID,
$id);
110 array_push($parents, $parent_id);
123 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
149 $titles[$parent_id] = $this->
getEntryById($parent_id)->getTitle();
156 return get_object_vars($this);
166 return current($this->id_to_entry_map) !==
false;
174 return key($this->id_to_entry_map);
182 return current($this->id_to_entry_map);
187 next($this->id_to_entry_map);
191 reset($this->id_to_entry_map);
199 return count($this->id_to_entry_map);
An exception for terminatinating execution or to throw for unit testing.
Abstract Entry Part to share some common entry functionality.
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable.
addEntries(ComponentEntries $entries)
jsonSerialize()
jsonSerialize implementation
__construct()
ComponentEntries constructor.
addEntry(ComponentEntry $entry)
Add and entry, first is always root.
setRootEntryId($root_entry_id)
getDescendantsOfEntry($id)
valid()
Iterator implementations.
getParentsOfEntryTitles($id)
getDescendantsOfEntryTitles($id)
count()
Countable implementations.
Stores Information of UI Components parsed from YAML, examples and less files.
if(!array_key_exists('StateId', $_REQUEST)) $id