public function init()
 {
     $this->name = "Управление контентом";
     $this->modelShowAttribute = "name";
     $this->modelClassName = CmsContent::className();
     parent::init();
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCmsContent()
 {
     return $this->hasOne(CmsContent::className(), ['id' => 'content_id']);
 }
Beispiel #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCmsContents()
 {
     return $this->hasMany(CmsContent::className(), ['content_type' => 'code'])->orderBy("priority ASC")->andWhere(['active' => Cms::BOOL_Y]);
 }
Beispiel #4
0
 /**
  * version > 2.4.8
  * @return \yii\db\ActiveQuery
  */
 public function getChildrenContents()
 {
     return $this->hasMany(CmsContent::className(), ['parent_content_id' => 'id']);
 }