usesNumericKeys = true; $this->indexedByName = false; } /** * Per WireArray interface, only Inputfield instances are accepted. * * @param Wire $item * @return bool * */ public function isValidItem($item) { return $item instanceof Inputfield; } /** * Extends the find capability of WireArray to descend into the Inputfield children * * @param string $selector * @return WireArray|InputfieldsArray * */ public function find($selector) { /** @var WireArray|InputfieldsArray $a */ $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; } public function makeBlankItem() { return null; // Inputfield is abstract, so there is nothing to return here } }