/** * Extends the find capability of WireArray to descend into the Inputfield children * */ public function find($selector) { $a = parent::find($selector); foreach ($this as $item) { if (!$item instanceof InputfieldWrapper) { continue; } $children = $item->children(); if (count($children)) { $a->import($children->find($selector)); } } return $a; }
/** * Find modules based on a selector string and ensure any ModulePlaceholders are loaded in the returned result * * @param string $selector * @return Modules * */ public function find($selector) { $a = parent::find($selector); if ($a) { foreach ($a as $key => $value) { $a[$key] = $this->get($value->class); } } return $a; }