示例#1
0
 /**
  * Retrieves all the Configs assigned to the filtered Apps using AppConnections
  * as junction table.
  *
  * @return \yii\db\ActiveQuery
  */
 public function getApp()
 {
     return $this->hasOne(App::className(), ['id' => 'app_id'])->via('appConnections', function ($query) {
         $query->where(['type' => Config::className()]);
     });
 }
示例#2
0
 /**
  * Retrieves all the Configs assigned to the filtered Apps using AppConnections
  * as junction table.
  *
  * @return \yii\db\ActiveQuery
  */
 public function getApp()
 {
     return $this->hasOne(App::className(), ['id' => 'app_id'])->via('appConnections', function ($query) {
         $query->where(['type' => \cyneek\yii2\menu\models\MenuItem::className()]);
     });
 }