public function init() { $this->name = "Управление контентом"; $this->modelShowAttribute = "name"; $this->modelClassName = CmsContentType::className(); parent::init(); }
/** * @return \yii\db\ActiveQuery */ public function getContentType() { return $this->hasOne(CmsContentType::className(), ['code' => 'content_type']); }