formField = $formField; $this->columnName = $formField->columnName; $this->model = $model; if (isset($configuration->sessionKey)) $this->sessionKey = $configuration->sessionKey; if (isset($configuration->previewMode)) $this->previewMode = $configuration->previewMode; /* * Form fields originally passed their configuration via the options index. * This step should be removed if year >= 2015. */ if (isset($configuration->options)) $configuration = array_merge($configuration->options, (array)$configuration); parent::__construct($controller, $configuration); } /** * Returns a unique ID for this widget. Useful in creating HTML markup. */ public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->columnName; $id = rtrim(str_replace(['[', ']'], '-', $id), '-'); return $id; } /** * Process the postback data for this widget. * @param $value The existing value for this widget. * @return string The new value for this widget. */ public function getSaveData($value) { return $value; } }