function RulesElementMap::getUnIndexedElements
1 call to RulesElementMap::getUnIndexedElements()
- RulesElementMap::index in ui/ui.core.inc
- Makes sure each element has an assigned id.
File
-
ui/ui.core.inc, line 117
Class
- RulesElementMap
- Helper object for mapping elements to ids.
Code
protected function getUnIndexedElements($element, &$unindexed = array()) {
$id = $element->property('elementId');
if (!isset($id)) {
$unindexed[] = $element;
}
else {
if ($id > $this->counter) {
$this->counter = $id;
}
$this->index[$id] = $element;
}
if ($element instanceof RulesContainerPlugin) {
foreach ($element as $child) {
$this->getUnIndexedElements($child, $unindexed);
}
}
return $unindexed;
}