Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCoa()
 {
     return $this->hasOne(Coa::className(), ['id' => 'coa_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCoas()
 {
     return $this->hasMany(Coa::className(), ['parent_id' => 'id']);
 }
Пример #3
0
 public function actionIndex()
 {
     $activeData = new ActiveDataProvider(['query' => \app\models\fico\Coa::find(), 'pagination' => false, 'sort' => ['defaultOrder' => ['code' => SORT_ASC]]]);
     return $activeData;
 }