public function init() { parent::init(); if (isset($this->default)) { $this->setValue($this->default); } }
/** * @inheritdoc */ public function init() { parent::init(); if (isset($this->default)) { $this->setValue($this->default); } if (!isset($this->format)) { throw new InvalidConfigException(Yii::t('gromver.models', __CLASS__ . '::format must be set for {attribute} attribute', ['attribute' => $this->getAttribute()])); } }