options = isset($array['options']) ? $array['options'] : []; $type = explode('_', $this->type, 2); $this->displayStyle = false !== strpos('_', $this->type) ? array_pop($type) : ''; } /** * @inheritDoc */ public function toArray() { return array_merge( parent::toArray(), [ 'options' => $this->options, ] ); } }