</div> <div class="row"> <div class="article-body"> <h1 class="article-title"> <p> <?php echo $section->name; ?> </p> </h1> <div class="row"> <?php foreach ($section->sub as $subsection) { ?> <div class="medium-6 column"> <?php if (isset($subsection->submenu->settings['link']) && !empty($subsection->submenu->settings['link'])) { ?> <?php $link = $subsection->submenu->settings['link']; ?> <?php } else { ?> <?php $link = Url::to($subsection->submenu->link); ?> <?php } ?> <a <?php echo MtHaml\Runtime::renderAttributes(array(array('class', 'section-link'), array('href', $link)), 'html5', 'UTF-8'); ?>> <?php $image = ""; ?> <?php if (!empty($subsection->submenu->image)) { ?>
<h1 class="article-title"> <p> <?php echo $section->name; ?> </p> </h1> <div class="row"> <?php foreach ($section->sub as $subsection) { ?> <div class="medium-6 column"> <?php if (isset($subsection->submenu->settings['link']) && !empty($subsection->submenu->settings['link'])) { ?> <?php $link = $subsection->submenu->settings['link']; ?> <?php } else { ?> <?php $link = Url::to($subsection->submenu->link); ?> <?php } ?>
/** * Executes and displays the template $file, with variables $variables */ public function display($file, array $variables) { $fun = $this->compileFile($file); $fun($variables); } /** * Executes the template $file with variables $variables, and returns its output */ public function render($file, array $variables)
public function render($file, array $variables) { $level = ob_get_level(); ob_start(); try { $this->display($file, $variables); } catch (\Exception $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e;
* @param string $file the view file. * @param array $params the parameters to be passed to the view file. * @return string the rendering result */ public function render($view, $file, $params) { return $this->parser->render($file, $params + ['app' => Yii::$app, 'this' => $view, 'view' => $view]); } }
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.
<div class="overlay"></div> <div class="base-bg"></div> <div class="row relative"> <div class="row"> <?php if (!isset($content)) { ?> <div class="content-inner large-10 large-push-1 column"> <?php echo $view->render('_articles.haml',compact('parent','content','section','breadcrumbs')); ?> </div> <?php } else { ?> <div class="content-inner large-10 large-push-1 column"> <?php if(isset($content)) { ?> <?php echo $view->render('_article.haml',compact('parent','content','section','breadcrumbs')); ?> <?php } else if (!empty($section->contents)) { ?>
/** * Executes and displays the template $file, with variables $variables */ public function display($file, array $variables) { $fun = $this->compileFile($file); $fun($variables); } /** * Executes the template $file with variables $variables, and returns its output */ public function render($file, array $variables)
public function render($file, array $variables) { $level = ob_get_level(); ob_start(); try { $this->display($file, $variables); } catch (\Exception $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e;
* @param string $file the view file. * @param array $params the parameters to be passed to the view file. * @return string the rendering result */ public function render($view, $file, $params) { return $this->parser->render($file, $params + ['app' => Yii::$app, 'this' => $view, 'view' => $view]); } }
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 InvalidParamException 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
if (count($section->contents) > 0) { $contents = $section->contents; $content = reset($contents); return $this->redirect(['/'.$section->slug.'/'.$content->content->slug]); } return $this->render('view.haml',compact('parent','section','content','breadcrumbs')); } public function actionTagged($tag) { Meta::tags($this, "inner tagged");
$args = $this->controller->bindActionParams($this, $params); Yii::trace('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::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
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__ . '/../site/vendor/autoload.php'); require(__DIR__ . '/../site/vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../site/config/web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'section' => 'learn-irish-with-us', ];