modules/api/v2/controllers/ColorController.php
/**
     * Lists all Brand models.
     * @return mixed
     */
Lists all Brand models.
@return mixed
Lists all Brand models . @return mixed
public function actionIndex()
    {
        $model = new $this->searchModelClass;
        $requestParams = Yii::$app->getRequest()->getBodyParams();
        $from = "";
        $product_id = "";
        if (empty($requestParams)) {
            $requestParams = Yii::$app->getRequest()->getQueryParams();
            $from = (!empty(Yii::$app->request->get('from')) && Yii::$app->request->get('from') == 'edit_product') ? Yii::$app->request->get('from') : "";
            $product_id = (!empty(Yii::$app->request->get('product_id'))) ? Yii::$app->request->get('product_id') : "";
        }
        return $model->search($requestParams, $from, $product_id);
    }
public function actionIndex ( ) { $ model = new $ this -> searchModelClass ; $ requestParams = Yii :: $ app -> getRequest ( ) -> getBodyParams ( ) ; $ from = " " ; $ product_id = " " ; if ( empty ( $ requestParams ) ) { $ requestParams = Yii :: $ app -> getRequest ( ) -> getQueryParams ( ) ; $ from = ( ! empty ( Yii :: $ app -> request -> get ( 'from' ) ) && Yii :: $ app -> request -> get ( 'from' ) == 'edit_product' ) ? Yii :: $ app -> request -> get ( 'from' ) : " " ; $ product_id = ( ! empty ( Yii :: $ app -> request -> get ( 'product_id' ) ) ) ? Yii :: $ app -> request -> get ( 'product_id' ) : " " ; } return $ model -> search ( $ requestParams , $ from , $ product_id ) ; }
Lists all Brand models.
Lists all Brand models .