コード例 #1
0
ファイル: MCSetting.php プロジェクト: hoangngk/adminpanel
 /**
  * @establish a relationship with client or website model
  */
 public function getCow()
 {
     if ($this->belong_to == 1) {
         return $this->hasOne(Client::className(), ['id' => 'clients_or_webs_id']);
     } elseif ($this->belong_to == 2) {
         return $this->hasOne(Website::className(), ['id' => 'clients_or_webs_id']);
     }
 }
コード例 #2
0
ファイル: Incident.php プロジェクト: rodespsan/FMAT-SAECC
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClient()
 {
     return $this->hasOne(Client::className(), ['id' => 'client_id']);
 }
コード例 #3
0
ファイル: Event.php プロジェクト: Sywooch/arenda
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdClient()
 {
     return $this->hasOne(Client::className(), ['id' => 'id_client']);
 }
コード例 #4
0
ファイル: ClientType.php プロジェクト: rodespsan/FMAT-SAECC
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClients()
 {
     return $this->hasMany(Client::className(), ['client_type_id' => 'id']);
 }
コード例 #5
0
ファイル: Discipline.php プロジェクト: rodespsan/FMAT-SAECC
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClients()
 {
     return $this->hasMany(Client::className(), ['discipline_id' => 'id']);
 }
コード例 #6
0
ファイル: Direction.php プロジェクト: savers/trip1
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClients()
 {
     return $this->hasMany(Client::className(), ['iddirection' => 'id']);
 }
コード例 #7
0
ファイル: GroupClient.php プロジェクト: hoangngk/adminpanel
 public function getClient()
 {
     // GroupClient has_one Group via Group.id -> groups_id
     return $this->hasOne(Client::className(), ['id' => 'clients_id']);
 }