コード例 #1
0
ファイル: Resource.php プロジェクト: Vitashev/resource-app
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOperations()
 {
     return $this->hasMany(Operation::className(), ['resource_id' => 'resource_id']);
 }
コード例 #2
0
ファイル: Catalog.php プロジェクト: kllakk/money
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOperation()
 {
     return $this->hasOne(Operation::className(), ['id' => 'operation_id']);
 }
コード例 #3
0
ファイル: OperationCategory.php プロジェクト: comaw/pars
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOperations()
 {
     return $this->hasMany(Operation::className(), ['id' => 'operation'])->viaTable('{{%operation_category_join}}', ['category' => 'id']);
 }