option) ? (array) $this->option : []; } /** * @override * Method to get the data to be passed to the layout for rendering. * * @return array An associative array of display data. */ public function getLayoutData() { $data = array(); $data['name'] = $this->name; $data['class'] = $this->class; $data['id'] = $this->id; $data['value'] = is_null($this->value) ? $this->default : $this->value; $data['required'] = $this->required === "true" || $this->required === true ? true : false; $data['multiple'] = !is_null($this->multiple) && $this->multiple != "false" ? true : false; $data['disabled'] = $this->disabled === "true" || $this->disabled === true ? true : false; $data['options'] = $this->getOptions(); return $data; } }