<ul class="list-unstyled"> <?php if (isset($model->pais_id)) : ?> <div class="d-block"> <a href="<?= Url::toRoute( [ 'vademecum/index', 'categoria_slug' => isset($model->categoria) ? $model->categoria->getSlug() : null, ] ) ?>" type="button" class="btn text-menu acumin-light bg-danger rounded-pill mb-2"> <?= $model->pais->nombre ?> <i class="fa fa-backspace fa-lg"></i> </a> </div> <?php else : ?> <?php foreach ($paises_con_alimentos as $key => $value) : ?> <li> <a href="<?= \yii\helpers\Url::toRoute( [ 'vademecum/index',
<a href="<?= Url::toRoute( [ 'vademecum/index', 'categoria_slug' => isset($model->categoria) ? $model->categoria->getSlug() : null, ] ) ?>" type="button" class="btn text-menu acumin-light bg-danger rounded-pill mb-2"> <?= $model->pais->nombre ?> <i class="fa fa-backspace fa-lg"></i> </a> </div> <?php else : ?> <?php foreach ($paises_con_alimentos as $key => $value) : ?> <li>
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
$jsFileGlobal = "/assets/js/global.{$this->version}-min.js"; if (file_exists(Yii::getAlias('@webroot') . $jsFileGlobal)) { $this->jsFileGlobal = $jsFileGlobal; } } return parent::render($view, $params, $context); } public function echoCssFilePreContent() { if (YII_ENV == 'dev') { return "<style>" .
Sugerir alimento </button> </div> </div> <div class="row"> <div class="col-12 mt-4 d-md-none"> <?= $this->render('_search_aside', [ 'model' => $searchModel, 'categorias' => $categorias, 'paises_con_alimentos' => $paises_con_alimentos, 'options' => ['pais_origen'], ]); ?> </div>
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
$jsFileGlobal = "/assets/js/global.{$this->version}-min.js"; if (file_exists(Yii::getAlias('@webroot') . $jsFileGlobal)) { $this->jsFileGlobal = $jsFileGlobal; } } return parent::render($view, $params, $context); } public function echoCssFilePreContent() { if (YII_ENV == 'dev') { return "<style>" .
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidArgumentException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
$queryParams = Yii::$app->request->queryParams; $dataProvider = $searchModel->search($queryParams); $dataProvider->setPagination([ 'pageSize' => $mobileDetect->isMobile() ? 5 : 28 ]); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'categorias' => $categorias, 'alimento' => $alimento ?? null, 'paises_con_alimentos' => $paises_con_alimentos ]);
$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();
require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); (new yii\web\Application($config))->run();
$_GET = [ 'categoria_slug' => 'fiambres-y-embutidos', 'AlimentoSearch' => [ 'pais_id' => '', ], 'page' => '3', 'per-page' => '28', ]; $_SESSION = [ '__flash' => [], 'coderius\\geoIp\\GeoIP:54.208.135.174' => unserialize('O:21:"coderius\\geoIp\\Result":8:{s:36:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_readerResult";a:7:{s:4:"city";a:2:{s:10:"geoname_id";i:4744870;s:5:"names";a:2:{s:2:"en";s:7:"Ashburn";s:2:"ru";s:12:"Ашберн";}}s:9:"continent";a:3:{s:4:"code";s:2:"NA";s:10:"geoname_id";i:6255149;s:5:"names";a:8:{s:2:"de";s:11:"Nordamerika";s:2:"en";s:13:"North America";s:2:"es";s:13:"Norteamérica";s:2:"fr";s:17:"Amérique du Nord";s:2:"ja";s:15:"北アメリカ";s:5:"pt-BR";s:17:"América do Norte";s:2:"ru";s:31:"Северная Америка";s:5:"zh-CN";s:9:"北美洲";}}s:7:"country";a:3:{s:10:"geoname_id";i:6252001;s:8:"iso_code";s:2:"US";s:5:"names";a:8:{s:2:"de";s:3:"USA";s:2:"en";s:13:"United States";s:2:"es";s:14:"Estados Unidos";s:2:"fr";s:11:"États-Unis";s:2:"ja";s:21:"アメリカ合衆国";s:5:"pt-BR";s:14:"Estados Unidos";s:2:"ru";s:6:"США";s:5:"zh-CN";s:6:"美国";}}s:8:"location";a:5:{s:15:"accuracy_radius";i:1000;s:8:"latitude";d:39.04809999999999803321770741604268550872802734375;s:9:"longitude";d:-77.47280000000000654836185276508331298828125;s:10:"metro_code";i:511;s:9:"time_zone";s:16:"America/New_York";}s:6:"postal";a:1:{s:4:"code";s:5:"20149";}s:18:"registered_country";a:3:{s:10:"geoname_id";i:6252001;s:8:"iso_code";s:2:"US";s:5:"names";a:8:{s:2:"de";s:3:"USA";s:2:"en";s:13:"United States";s:2:"es";s:14:"Estados Unidos";s:2:"fr";s:11:"États-Unis";s:2:"ja";s:21:"アメリカ合衆国";s:5:"pt-BR";s:14:"Estados Unidos";s:2:"ru";s:6:"США";s:5:"zh-CN";s:6:"美国";}}s:12:"subdivisions";a:1:{i:0;a:3:{s:10:"geoname_id";i:6254928;s:8:"iso_code";s:2:"VA";s:5:"names";a:6:{s:2:"en";s:8:"Virginia";s:2:"fr";s:8:"Virginie";s:2:"ja";s:18:"バージニア州";s:5:"pt-BR";s:9:"Virgínia";s:2:"ru";s:18:"Вирджиния";s:5:"zh-CN";s:15:"弗吉尼亚州";}}}}s:28:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_city";O:19:"coderius\\geoIp\\City":2:{s:32:"' . "\0" . 'coderius\\geoIp\\City' . "\0" . '_geoname_id";i:4744870;s:27:"' . "\0" . 'coderius\\geoIp\\City' . "\0" . '_names";a:2:{s:2:"en";s:7:"Ashburn";s:2:"ru";s:12:"Ашберн";}}s:33:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_continent";O:24:"coderius\\geoIp\\Continent":3:{s:31:"' . "\0" . 'coderius\\geoIp\\Continent' . "\0" . '_code";s:2:"NA";s:37:"' . "\0" . 'coderius\\geoIp\\Continent' . "\0" . '_geoname_id";i:6255149;s:32:"' . "\0" . 'coderius\\geoIp\\Continent' . "\0" . '_names";a:8:{s:2:"de";s:11:"Nordamerika";s:2:"en";s:13:"North America";s:2:"es";s:13:"Norteamérica";s:2:"fr";s:17:"Amérique du Nord";s:2:"ja";s:15:"北アメリカ";s:5:"pt-BR";s:17:"América do Norte";s:2:"ru";s:31:"Северная Америка";s:5:"zh-CN";s:9:"北美洲";}}s:31:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_country";O:22:"coderius\\geoIp\\Country":3:{s:33:"' . "\0" . 'coderius\\geoIp\\Country' . "\0" . '_iso_code";s:2:"US";s:35:"' . "\0" . 'coderius\\geoIp\\Country' . "\0" . '_geoname_id";i:6252001;s:30:"' . "\0" . 'coderius\\geoIp\\Country' . "\0" . '_names";a:8:{s:2:"de";s:3:"USA";s:2:"en";s:13:"United States";s:2:"es";s:14:"Estados Unidos";s:2:"fr";s:11:"États-Unis";s:2:"ja";s:21:"アメリカ合衆国";s:5:"pt-BR";s:14:"Estados Unidos";s:2:"ru";s:6:"США";s:5:"zh-CN";s:6:"美国";}}s:32:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_location";O:23:"coderius\\geoIp\\Location":5:{s:41:"' . "\0" . 'coderius\\geoIp\\Location' . "\0" . '_accuracy_radius";i:1000;s:34:"' . "\0" . 'coderius\\geoIp\\Location' . "\0" . '_latitude";d:39.04809999999999803321770741604268550872802734375;s:35:"' . "\0" . 'coderius\\geoIp\\Location' . "\0" . '_longitude";d:-77.47280000000000654836185276508331298828125;s:36:"' . "\0" . 'coderius\\geoIp\\Location' . "\0" . '_metro_code";i:511;s:35:"' . "\0" . 'coderius\\geoIp\\Location' . "\0" . '_time_zone";s:16:"America/New_York";}s:30:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_postal";O:21:"coderius\\geoIp\\Postal":3:{s:28:"' . "\0" . 'coderius\\geoIp\\Postal' . "\0" . '_code";s:5:"20149";s:34:"' . "\0" . 'coderius\\geoIp\\Postal' . "\0" . '_geoname_id";N;s:29:"' . "\0" . 'coderius\\geoIp\\Postal' . "\0" . '_names";a:0:{}}s:41:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_registeredCountry";O:32:"coderius\\geoIp\\RegisteredCountry":3:{s:43:"' . "\0" . 'coderius\\geoIp\\RegisteredCountry' . "\0" . '_iso_code";s:2:"US";s:45:"' . "\0" . 'coderius\\geoIp\\RegisteredCountry' . "\0" . '_geoname_id";i:6252001;s:40:"' . "\0" . 'coderius\\geoIp\\RegisteredCountry' . "\0" . '_names";a:8:{s:2:"de";s:3:"USA";s:2:"en";s:13:"United States";s:2:"es";s:14:"Estados Unidos";s:2:"fr";s:11:"États-Unis";s:2:"ja";s:21:"アメリカ合衆国";s:5:"pt-BR";s:14:"Estados Unidos";s:2:"ru";s:6:"США";s:5:"zh-CN";s:6:"美国";}}s:36:"' . "\0" . 'coderius\\geoIp\\Result' . "\0" . '_subdivisions";a:1:{i:0;O:26:"coderius\\geoIp\\Subdivision":3:{s:37:"' . "\0" . 'coderius\\geoIp\\Subdivision' . "\0" . '_iso_code";s:2:"VA";s:39:"' . "\0" . 'coderius\\geoIp\\Subdivision' . "\0" . '_geoname_id";i:6254928;s:34:"' . "\0" . 'coderius\\geoIp\\Subdivision' . "\0" . '_names";a:6:{s:2:"en";s:8:"Virginia";s:2:"fr";s:8:"Virginie";s:2:"ja";s:18:"バージニア州";s:5:"pt-BR";s:9:"Virgínia";s:2:"ru";s:18:"Вирджиния";s:5:"zh-CN";s:15:"弗吉尼亚州";}}}}'), ];