), ),false)) { function content_63ca72e789c034_99586357 (Smarty_Internal_Template $_smarty_tpl) { echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['set'][0], array( array('title'=>$_smarty_tpl->tpl_vars['title']->value),$_smarty_tpl ) );?> <h1 class="mt0"><?php echo $_smarty_tpl->tpl_vars['this']->value->title;?> </h1> <?php if (count($_smarty_tpl->tpl_vars['years']->value) > 1) {?> <ul id="issue-filter" class="nav nav-pills"> <?php $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['years']->value, 'item', false, NULL, 'years', array ( 'first' => true, 'index' => true, )); $_smarty_tpl->tpl_vars['item']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) { $_smarty_tpl->tpl_vars['item']->do_else = false;
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['set'][0], array( array('title'=>$_smarty_tpl->tpl_vars['title']->value),$_smarty_tpl ) );?> <h1 class="mt0"><?php echo $_smarty_tpl->tpl_vars['this']->value->title;?> </h1> <?php if (count($_smarty_tpl->tpl_vars['years']->value) > 1) {?> <ul id="issue-filter" class="nav nav-pills"> <?php $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['years']->value, 'item', false, NULL, 'years', array ( 'first' => true, 'index' => true, ));
} if ($_template->startRenderCallbacks) { foreach ($_template->startRenderCallbacks as $callback) { call_user_func($callback, $_template); } } $unifunc($_template); foreach ($_template->endRenderCallbacks as $callback) { call_user_func($callback, $_template); } $_template->isRenderingCache = false; } catch (Exception $e) { $_template->isRenderingCache = false;
$_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } if ($_template->source->handler->uncompiled) { $_template->source->handler->renderUncompiled($_template->source, $_template); } else { $this->getRenderedTemplateCode($_template); } if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[ $this->nocache_hash ] = true; } if ($_template->smarty->debugging) { $_template->smarty->_debug->end_render($_template);
} $this->cached->render($this, $no_output_filter); } else { if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) { $this->loadCompiled(true); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cacheModify->cacheModifiedCheck( $this->cached,
} ob_start(); $template->_mergeVars(); if (!empty(Smarty::$global_tpl_vars)) { $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); } $result = $template->render(false, $function); $template->_cleanUp(); if ($saveVars) { $template->tpl_vars = $savedTplVars; $template->config_vars = $savedConfigVars; } else { if (!$function && !isset(Smarty_Internal_Template::$tplObjCache[ $template->templateId ])) {
* @throws Exception * @throws SmartyException * @return string rendered template output */ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) { $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); return $result === null ? ob_get_clean() : $result; } /** * displays a Smarty template *
// Make Yii params available as smarty config variables $template->config_vars = Yii::$app->params; $template->assign('app', \Yii::$app); $template->assign('this', $view); return $template->fetch(); } /** * Resolves Yii alias into file path * * @param string $type
if (isset($this->renderers[$ext])) { if (is_array($this->renderers[$ext]) || is_string($this->renderers[$ext])) { $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); }
* @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.
* 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
throw new HttpException(404, Yii::t('yii', 'Страница не найдена.')); } $projects->andWhere(['year(`end`)' => $year]); } return $this->render('index.tpl', [ 'title' => $title, 'projects' => $projects->all(), 'type' => $type, 'archive' => $archive, 'years' => $years, 'year' => $year, 'pagination' => $pagination ]); } public function actionProject($type, $project_url, $page_url = false) { $project = Project::find()->visible()->where(['type' => $type, 'url' => $project_url])->one(); if (empty($project)) throw new HttpException(404, Yii::t('yii', 'Page not found.'));
$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(__DIR__ . '/../koncept/common/config/main.php'), require(__DIR__ . '/../koncept/frontend/config/web.php') ); (new yii\web\Application($config))->run();
$_GET = [ 'type' => 'project', ];