public function actionIndex($caller)
    {
        $model = new $this->modelClass();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            $model = new $this->modelClass();
        }
        if (Yii::$app->request->post('hasEditable')) {
            $this->_update();
            return;
        }

        $searchModel = new $this->modelClass(['scenario' => \humanized\lookup\models\LookupTable::SCENARIO_SEARCH]);
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
                    'caller' => $caller,
                    'model' => $model,
                    'searchModel' => $searchModel,
                    'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex($caller)
    {
        $model = new $this->modelClass();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            $model = new $this->modelClass();
        }
        if (Yii::$app->request->post('hasEditable')) {
            $this->_update();
            return;
        }

        $searchModel = new $this->modelClass(['scenario' => \humanized\lookup\models\LookupTable::SCENARIO_SEARCH]);
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
                    'caller' => $caller,
                    'model' => $model,
                    'searchModel' => $searchModel,
                    'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( $ caller ) { $ model = new $ this -> modelClass ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { $ model = new $ this -> modelClass ( ) ; } if ( Yii :: $ app -> request -> post ( 'hasEditable' ) ) { $ this -> _update ( ) ; return ; } $ searchModel = new $ this -> modelClass ( [ 'scenario' => \ humanized \ lookup \ models \ LookupTable :: SCENARIO_SEARCH ] ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; return $ this -> render ( 'index' , [ 'caller' => $ caller , 'model' => $ model , 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , ] ) ; }
Single interface for all CRUD Operations.
@return mixed
Single interface for all CRUD Operations .