Exemplo n.º 1
0
 /**
  * Creates a new Item model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     print_r(Yii::$app->request->post());
     exit;
     $model = Kiwi::getItem();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->item_id]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
Exemplo n.º 2
0
function &get_kiwi()
{
    return Kiwi::get_kiwi();
}
Exemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomer()
 {
     return $this->hasOne(Kiwi::getCustomerClass(), ['user_id' => 'user_id']);
 }