Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->className() == Category::className()) {
         $this->visible = 1;
     }
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(Category::className(), ['id' => 'category_id']);
 }