Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTheme()
 {
     return $this->hasOne(Theme::className(), ['id' => 'theme_id'])->via('ui');
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getThemes()
 {
     return $this->hasMany(Theme::className(), ['created_by' => 'id'])->inverseOf('author');
 }