public function __construct($items = null) { // if the first parameter is not an array, or we have more than one parameter, collate all parameters to an array // otherwise use the passed array $itemsArr = (!is_array($items) || count(func_get_args()) > 1) ? func_get_args() : $items; parent::__construct($itemsArr); foreach($this->items as $item) { $item->setContainerFieldSet($this); } }