title = $place->title; $this->width = $place->width; $this->height = $place->height; $this->active = $place->active; $this->place = $place; } parent::__construct($config); } public function rules(): array { return [ [['title'], 'required'], [['width', 'height', 'active'], 'integer'], ]; } public function attributeLabels() { return [ 'id' => Yii::t('banners', 'ID'), 'title' => Yii::t('banners', 'Title'), 'width' => Yii::t('banners', 'Width'), 'height' => Yii::t('banners', 'Height'), 'active' => Yii::t('banners', 'Status'), ]; } }