// $categoryModel = CategoryMaster::find() // ->where(['status' => CategoryMaster::STATUS_ACTIVE, 'is_deleted' => 0]) // ->andWhere(new Expression('FIND_IN_SET(:card_id, card_id)'))->addParams([':card_id' => $this->menuCard->id]) // ->orderBy(['sort_order' => SORT_ASC])->with('category')->all(); // $categoryModel = CategoryMaster::find()->select('category_master.*, card_category_sort.sort_id')->leftJoin('card_category_sort', 'category_master.id = card_category_sort.category_id')->where(['category_master.status' => CategoryMaster::STATUS_ACTIVE, 'category_master.is_deleted' => 0])->andWhere(new Expression('FIND_IN_SET(:card_id, category_master.card_id)'))->addParams([':card_id' => $this->menuCard->id])->orderBy(['card_category_sort.sort_id'=>SORT_ASC])->all(); $searchModel = new CategoryMasterSearch(); $searchModel->is_deleted = 0; $searchModel->add_category_card_id = $this->menuCard->id; $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $this->menuCard->id); $categoryModel = $dataProvider->getModels(); $categoryFoodData = array(); $glutenfreiArr = AllergenMaster::$glutenfrei; foreach ($categoryModel as $value) { if($hasSorting){ $condition = ['category_sort_id' => $value->id];
// ->orderBy(['sort_order' => SORT_ASC])->with('category')->all(); // $categoryModel = CategoryMaster::find()->select('category_master.*, card_category_sort.sort_id')->leftJoin('card_category_sort', 'category_master.id = card_category_sort.category_id')->where(['category_master.status' => CategoryMaster::STATUS_ACTIVE, 'category_master.is_deleted' => 0])->andWhere(new Expression('FIND_IN_SET(:card_id, category_master.card_id)'))->addParams([':card_id' => $this->menuCard->id])->orderBy(['card_category_sort.sort_id'=>SORT_ASC])->all(); $searchModel = new CategoryMasterSearch(); $searchModel->is_deleted = 0; $searchModel->add_category_card_id = $this->menuCard->id; $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $this->menuCard->id); $categoryModel = $dataProvider->getModels(); $categoryFoodData = array(); $glutenfreiArr = AllergenMaster::$glutenfrei;
'vegen' => 'vegen', 'search' => 'search', ); if(in_array($card,$menu) || $slug == 'home'){ return $this->render("index", $this->getFoodData()); } return $this->render("menu_card", $this->getStoreFoodData($slug,$card)); }else{ return $this->render("index", $this->getFoodData()); } }
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
$config = yii\helpers\ArrayHelper::merge( require(dirname(__DIR__) . '/common/config/main.php'), require(dirname(__DIR__) . '/common/config/main-local.php'), require(__DIR__ . '/config/main.php'), require(__DIR__ . '/config/main-local.php') ); $application = new yii\web\Application($config); date_default_timezone_set('Europe/Berlin'); $application->run();
$_GET = [ 'slug' => 'mauganeschtle', 'card' => 'lieferservice', 'url' => 'mauganeschtle/lieferservice', ]; $_SESSION = [ '__flash' => [], '__id' => 34, '__authKey' => null, 'defaultCompanyID' => 35, ];