コード例 #1
0
ファイル: Messages.php プロジェクト: Nosthertus/SM
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNetworks()
 {
     return $this->hasMany(Network::className(), ['id' => 'network_id'])->viaTable('network_has_messages', ['messages_id' => 'id']);
 }
コード例 #2
0
ファイル: NetworkHasPhotos.php プロジェクト: Nosthertus/SM
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNetwork()
 {
     return $this->hasOne(Network::className(), ['id' => 'network_id']);
 }
コード例 #3
0
ファイル: Accounts.php プロジェクト: Nosthertus/SM
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getNetworks()
 {
     return $this->hasMany(Network::className(), ['accounts_id' => 'id']);
 }