Ejemplo n.º 1
0
 public function afterSave($insert, $changedAttributes)
 {
     if (parent::afterSave($insert, $changedAttributes)) {
         BalanceItemExt::$use_view = true;
         return true;
     } else {
         return false;
     }
 }
 /**
  * Lists all BalanceItem models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => BalanceItemExt::find()->orderBy('order_code')]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBalanceItems()
 {
     return $this->hasMany(BalanceItemExt::className(), ['balance_type_id' => 'id']);
 }