<li class="mb-5"> <a href="<?= $next['link'] ? $next['link']->getHref() : '#' ?>"> <div class="item shadow pl-5 pr-3 py-4"> <div class="round-icon shadow d-flex align-items-center justify-content-center"> <img src="<?= $next['icon'] ? $next['icon']->getSource() : '/img/icon.svg' ?>" alt=""> </div> <?php if($next['title']): ?> <h1 class="m-0 p-0 mb-2"><?= $next['title'] ?></h1> <?php endif; ?> <?php if($next['subTitle']): ?> <p class="m-0 p-0"><?= $next['subTitle'] ?></p> <?php endif; ?> </div> </a> </li> <?php endforeach;?> </ul> <?php endif; ?> </div>
<div class="round-icon shadow d-flex align-items-center justify-content-center"> <img src="<?= $next['icon'] ? $next['icon']->getSource() : '/img/icon.svg' ?>" alt=""> </div> <?php if($next['title']): ?> <h1 class="m-0 p-0 mb-2"><?= $next['title'] ?></h1> <?php endif; ?> <?php if($next['subTitle']): ?> <p class="m-0 p-0"><?= $next['subTitle'] ?></p> <?php endif; ?> </div> </a> </li> <?php endforeach;?>
{ $_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.
/** * @inheritdoc */ public function frontend() { return $this->view->render($this->getViewFileName('php'), [], $this); } /** * @inheritdoc */ public function renderFrontend()
/** * @inheritdoc */ public function renderFrontend() { $this->injectorSetup(); return $this->frontend(); } /** * @inheritdoc */ public function renderAdmin()
} $blockObject->setPlaceholderValues($insertedHolders); // output buffer the rendered frontend method of the block if ($layoutBlockInstance) { $blockResponse = $layoutBlockInstance->placeholderRenderIteration($blockObject); } else { $blockResponse = $blockObject->renderFrontend(); } if ($blockObject->getIsCacheEnabled()) { $this->setHasCache($cacheKey, $blockResponse, null, $blockObject->getCacheExpirationTime()); $blockObject->onRegister();
* * @param string $placeholderName The Cmslayout placeholder identifier * @return string */ public function renderPlaceholder($placeholderName) { return $this->renderPlaceholderRecursive($this->id, $placeholderName, 0); } /** * Render a placeholder recursive based on navItemPageId, a placeholder variable and a previous id. * * @param integer $navItemPageId
throw new InvalidConfigException("Unable to find the requested cms layout '{$this->layout_id}' for nav item page id '{$this->id}'. Make sure your page does not have an old inactive/deleted cms layout selected."); } $placholders = []; foreach ($this->layout->getJsonConfig('placeholders') as $row) { foreach ($row as $item) { $placholders[$item['var']] = $this->renderPlaceholder($item['var']); } } return Yii::$app->view->render($this->layout->view_file, [ 'placeholders' => $placholders, ], $this);
$typeModel->setOptions([ 'navItemId' => $navItemId, 'restString' => $appendix, ]); $content = $typeModel->getContent(); if ($content instanceof Response) { return Yii::$app->end(0, $content); } // it seems to be a json response as it is an array
} } throw new NotFoundHttpException($e->getMessage()); } $content = $this->renderItem($current->id, Yii::$app->menu->currentAppendix); // It seems to be a json response. Yii::$app->response->format should be FORMAT_JSON or FORMAT_JSONP if (is_array($content)) { return $content; }
$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) {
// apply strict, hsts and x-* headers Yii::$app->response->headers->set('Strict-Transport-Security', 'max-age=31536000'); Yii::$app->response->headers->set('X-XSS-Protection', "1; mode=block"); Yii::$app->response->headers->set('X-Frame-Options', "SAMEORIGIN"); } return parent::handleRequest($request); } /** * @inheritdoc */ public function coreComponents()
{ 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 = $this->getConfigArray(); $this->includeYii(); $mergedConfig = ArrayHelper::merge($config, ['bootstrap' => ['luya\web\Bootstrap']]); $this->app = new WebApplication($mergedConfig); if (!$this->mockOnly) { return $this->app->run(); } } /** * Returns the path to luya core files *
public function run() { if ($this->getIsCli()) { return $this->applicationConsole(); } return $this->applicationWeb(); } /** * Run Cli-Application based on the provided config file. * * @return string|integer
// composer autoload include require(__DIR__ . '/../vendor/autoload.php'); // use the luya boot wrapping class $boot = new \luya\Boot(); $boot->setBaseYiiFile(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $boot->run();
$_GET = [ 'path' => 'materiały/deklaracje', 'acceptCookies' => '1', ];