public function __construct($children = null) { if ($children instanceof FieldList) { $this->children = $children; } elseif (is_array($children)) { $this->children = new FieldList($children); } else { //filter out null/empty items $children = array_filter(func_get_args()); $this->children = new FieldList($children); } $this->children->setContainerField($this); parent::__construct(null, false); }