<div class=\"inner-breadcrumb\"> <div> <img src=\"/files/98ff12c9dd33425269d3538f09656358.jpg\">"; foreach ($this->menu[$itemMenu]['model'] as $m) { $url = ""; $name=""; $LANG = \Yii::$app->lang->getCurrentNew()->url; if ($itemMenu == 0) {$url = "/".$LANG."/products/" . $m->alias; $name=$m->content->title;} if ($itemMenu == 1) {$url = "/".$LANG."/products/" . $m->parent->alias . "/" . $m->alias; $name=$m->content->title;} if ($itemMenu == 2) {$url = "/".$LANG."/products/" . $m->group->parent->alias . "/" . $m->alias; $name=$m->content->name;} $menuHtml .= $m->id==$this->menu[$itemMenu]['id'] ? "<a href='$url' targen=\"_blank\" class=\"active\">" . $name . "</a>" : "<a href='$url' targen=\"_blank\">" . $name . "</a>"; } $menuHtml .= " </div> </div>
foreach ($this->menu[$itemMenu]['model'] as $m) { $url = ""; $name=""; $LANG = \Yii::$app->lang->getCurrentNew()->url; if ($itemMenu == 0) {$url = "/".$LANG."/products/" . $m->alias; $name=$m->content->title;} if ($itemMenu == 1) {$url = "/".$LANG."/products/" . $m->parent->alias . "/" . $m->alias; $name=$m->content->title;} if ($itemMenu == 2) {$url = "/".$LANG."/products/" . $m->group->parent->alias . "/" . $m->alias; $name=$m->content->name;} $menuHtml .= $m->id==$this->menu[$itemMenu]['id'] ? "<a href='$url' targen=\"_blank\" class=\"active\">" . $name . "</a>" : "<a href='$url' targen=\"_blank\">" . $name . "</a>"; }
$link = Html::a($label, $link['url'], $options); } else { $link = $label; } $menuItems = $itemMenu!=null ? $this->renderDropDownMenu($itemMenu) : ""; $res = strtr($template, ['{link}' => $link, '{menu}' => $menuItems]); return $res; }
$i=1; foreach ($this->links as $link) { if (!is_array($link)) { $link = ['label' => $link]; } $links[] = isset($link['url']) ? $this->renderItem($link, $this->itemTemplate, $this->isDropDownMenu?$i:null) : $this->renderItem($link,$this->activeItemTemplate); $i++; } echo Html::tag($this->tag, implode('', $links), $this->options); }
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
<!--Основной блок2--> <?= megabanners::widget(); ?> <main> <div class="container"> <?php if (Yii::$app->controller->route != 'page/index') : ?> <?= Breadcrumbs::widget([ 'homeLink' => ['label' => Yii::t('title', 'Главная'), 'url' => $url], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'isDropDownMenu' => isset($this->params['isBreadcrumbsDropDown']) ? $this->params['isBreadcrumbsDropDown'] : false, 'menu' => isset($this->params['menu']) ? $this->params['menu'] : [], ]) ?> <?php endif; ?> </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.
<?php use yii\helpers\Html; echo $this->render('@common/views/layouts/main', ['content' => $content]);
{ $_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;
* @since 2.0.1 */ public function renderContent($content) { $layoutFile = $this->findLayoutFile($this->getView()); if ($layoutFile !== false) { return $this->getView()->renderFile($layoutFile, ['content' => $content], $this); } return $content; } /**
* @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 * @return string the rendering result of the layout with the given static string as the `$content` variable.
$menu[2]['model'] = Product::getSosedi($model->id, $model->group_id); $menu[2]['id'] = $model->id; return $this->render('view', [ 'model' => $model, 'menu' => $menu, 'opListData' => ProductTabsManager::getOpListData($model), ]); } public function actionViewMod($mod_alias) {
]); } public function actionGroup($item_id = null, $alias = null, $suf = null) { if ($suf) if ($render = $this->actionView(null, $suf)) return $render; $model = ProductGroup::find()->with('content'); if ($item_id) $model->andWhere(['product_group.id' => $item_id]); elseif ($alias) $model->andWhere(['product_group.alias' => $alias]);
$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) {
$this->location(); $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') ); $application = new common\components\Application($config); $application->run();
$_GET = [ 'item_id' => 21, 'alias' => 'dashboards', 'url' => unserialize('O:8:"stdClass":9:{s:6:"scheme";s:4:"http";s:4:"host";s:17:"www.energomera.ru";s:4:"path";s:31:"/ru/products/dashboards/sheu1-s";s:7:"url_arr";a:5:{i:0;s:0:"";i:1;s:2:"ru";i:2;s:8:"products";i:3;s:10:"dashboards";i:4;s:7:"sheu1-s";}s:8:"host_arr";a:3:{i:0;s:3:"www";i:1;s:10:"energomera";i:2;s:2:"ru";}s:5:"query";N;s:4:"lang";N;s:3:"url";s:27:"products/dashboards/sheu1-s";s:5:"alias";a:3:{i:0;s:8:"products";i:1;s:10:"dashboards";i:2;s:7:"sheu1-s";}}'), 'suf' => 'sheu1-s', ]; $_SESSION = [ '__flash' => [], 'site' => unserialize('O:8:"stdClass":16:{s:2:"id";i:2;s:4:"name";s:20:"Энергомера";s:11:"virtual_url";i:1;s:12:"virtual_file";i:1;s:10:"multi_lang";i:1;s:14:"menu_id_header";i:2;s:14:"menu_id_footer";i:6;s:14:"soc_net_footer";i:1;s:6:"search";i:1;s:6:"banner";i:1;s:3:"cfg";N;s:9:"status_id";i:1;s:5:"order";i:254;s:7:"adminka";N;s:10:"cache_time";N;s:5:"domen";O:8:"stdClass":9:{s:2:"id";i:13;s:7:"site_id";i:2;s:4:"host";s:17:"www.energomera.ru";s:8:"protocol";s:4:"http";s:16:"google_analytics";s:13:"UA-16839660-1";s:14:"yandex_metrika";s:14:"43500;37778640";s:9:"status_id";i:1;s:5:"order";i:0;s:3:"url";s:24:"http://www.energomera.ru";}}'), 'lang' => 'ru', 'url' => unserialize('O:8:"stdClass":9:{s:6:"scheme";s:4:"http";s:4:"host";s:17:"www.energomera.ru";s:4:"path";s:31:"/ru/products/dashboards/sheu1-s";s:7:"url_arr";a:5:{i:0;s:0:"";i:1;s:2:"ru";i:2;s:8:"products";i:3;s:10:"dashboards";i:4;s:7:"sheu1-s";}s:8:"host_arr";a:3:{i:0;s:3:"www";i:1;s:10:"energomera";i:2;s:2:"ru";}s:5:"query";N;s:4:"lang";N;s:3:"url";s:27:"products/dashboards/sheu1-s";s:5:"alias";a:3:{i:0;s:8:"products";i:1;s:10:"dashboards";i:2;s:7:"sheu1-s";}}'), 'location' => [ 'region' => [ 'id' => 26, 'name' => '26 Ставропольский край', 'name_to_title' => '', 'city' => 'в Ставрополе', 'kladr' => 'Ставропольский', 'socr' => 'край', 'latitude' => '45.033333', 'longitude' => '41.966667', 'zoom' => 8, 'status_id' => 1, 'sx_id' => 487839, 'sx_name' => '', 'count' => 10177949, ], 'countries' => [ 'id' => 1, 'country' => 'Россия', 'code' => 'RUB', 'currency' => 'Российский рубль', 'latitude' => '60', 'longitude' => '100', 'zoom' => 0, 'status_id' => 1, 'order' => 255, 'sx_id' => 185, 'sx_name' => '', 'count' => 1497, ], 'placeStr' => 'Ставропольский край', 'autoFind' => true, ], ];