Exemple #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->className() == Album::className()) {
         $this->visible = 1;
     }
 }
Exemple #2
0
 public function getAlbum()
 {
     return $this->hasOne(Album::className(), ['id' => 'album_id']);
 }
Exemple #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAlbums()
 {
     return $this->hasMany(Album::className(), ['category_id' => 'id']);
 }