public function __construct($data = []) { if (!isset($data['fields'])) { $data['fields'] = new FieldCollection(); } parent::__construct($data); }