in /var/www/public/protected/vendor/yiisoft/yii2/caching/MemCache.php at line 296
{% endif %} {% endblock canonical_url %} {% if app.params['UsePingback'] %} {% block meta_pingback %} <link rel="pingback" href="{{ oPage.getPingbackUrl() }}" /> {% endblock meta_pingback %} {% endif %} {% block meta_userinput %} {% for oMetaTag in oPage.metaTags %} <meta {{ oMetaTag.AttributeName }}="{{ oMetaTag.AttributeValue }}" content="{{ oMetaTag.Content }}"/> {% endfor %} {% endblock meta_userinput %} {% block lang_refs %} {% for oLangPage in oPage.allLanguages %} {% if oLangPage.LangCode != oPage.LangCode and oLangPage.canRead() %} <link rel="alternate" hreflang="{{ oLangPage.getShortLangCode() }}" href="{{ oLangPage.getRedirectUrl() }}" /> {% endif %}
echo " "; } // line 51 echo " "; // line 52 $this->displayBlock('meta_userinput', $context, $blocks); // line 57 echo " "; // line 58 $this->displayBlock('lang_refs', $context, $blocks); // line 65
if (null !== $template && !$template instanceof self) { throw new \LogicException('A block must be a method on a \Twig\Template instance.'); } if (null !== $template) { try { $template->$block($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($template->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
} protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 1 $this->displayBlock('outer', $context, $blocks); } public function block_outer($context, array $blocks = []) { $macros = $this->macros; // line 2
return ob_get_clean(); } protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{ return $this->blocks; } public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } public function render(array $context) { $level = ob_get_level(); if ($this->env->isDebug()) {
echo yii\twig\Template::attribute($this->env, $this->getSourceContext(), ($context["app"] ?? null), "shortLanguage", []); echo "\""; echo $this->extensions['Additor\components\twig\Extension']->_debugNode(); echo "> "; // line 9 $this->loadTemplate($this->extensions['Additor\components\twig\Extension']->_includeTemplate((yii\twig\Template::attribute($this->env, $this->getSourceContext(), ($context["oPage"] ?? null), "Class", []) . "Page.head.EXTENSION.twig")), "@Additor_Custom/frontend/twig/Page/Page.html.twig", 9)->display($context); // line 10 echo " "; $this->displayBlock('body', $context, $blocks); // line 145 echo " </html> ";
if (null !== $template && !$template instanceof self) { throw new \LogicException('A block must be a method on a \Twig\Template instance.'); } if (null !== $template) { try { $template->$block($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($template->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
echo " "; yii\twig\Template::attribute($this->env, $this->getSourceContext(), ($context["this"] ?? null), "beginPage", [], "method"); // line 6 echo " <!DOCTYPE html> "; // line 7 $this->displayBlock('html', $context, $blocks); // line 147 yii\twig\Template::attribute($this->env, $this->getSourceContext(), ($context["this"] ?? null), "endPage", [], "method"); } // line 7 public function block_html($context, array $blocks = [])
if (null !== $template && !$template instanceof self) { throw new \LogicException('A block must be a method on a \Twig\Template instance.'); } if (null !== $template) { try { $template->$block($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($template->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
// line 2 $context["oRootPage"] = yii\twig\Template::attribute($this->env, $this->getSourceContext(), ($context["oPage"] ?? null), "getRootPage", [0 => true], "method"); // line 3 echo " "; // line 4 $this->displayBlock('outer', $context, $blocks); // line 149 echo "
return ob_get_clean(); } protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{ return $this->blocks; } public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } public function render(array $context) { $level = ob_get_level(); if ($this->env->isDebug()) {
return $this->loadTemplate($this->extensions['Additor\components\twig\Extension']->_extendParentTemplate(), "@Additor_Custom/frontend/twig/Page/StartPage.html.twig", 1); } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; $this->getParent($context)->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_body_attributes($context, array $blocks = []) { $macros = $this->macros;
return ob_get_clean(); } protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions
{ return $this->blocks; } public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } public function render(array $context) { $level = ob_get_level(); if ($this->env->isDebug()) {
if ($this->env->isDebug()) { ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e;
* @param array $context An array of parameters to pass to the template */ public function render(array $context = []): string { // using func_get_args() allows to not expose the blocks argument // as it should only be used by internal code return $this->template->render($context, \func_get_args()[1] ?? []); } /** * Displays the template. * * @param array $context An array of parameters to pass to the template
* @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []) { return $this->load($name)->render($context); } /** * Displays a template. * * @param string|TemplateWrapper $name The template name
$this->oTwigExtension->beforeRender($this, $aParams); $oTemplate = $this->oTwigExtension->findTemplate($cTemplate, \Yii::$app->request->getMode()); if ($oTemplate) { $this->oTwigExtension->addUsage($oTemplate->cFullName, "start", ""); $this->twig->addGlobal('this', $view); return $this->twig->render($oTemplate->cFullName, $aParams); } else { throw new \Exception("Template " . $cTemplate . " not found!"); } return null; }
} elseif ($this->renderers == null) { $this->renderers = [$ext => \Yii::createObject('Additor\components\twig\ViewRenderer')]; } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); \Yii::trace("Rendering twig template done", __METHOD__); $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
public function render($view, $params = [], $context = null) { if (preg_match ("/\.twig$/", $view)) { ob_start(); ob_implicit_flush(false); echo $this->renderTwig($view, $params, $context); return ob_get_clean(); } else return parent::render($view, $params, $context); }
* 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
* @param boolean $return * @return string */ public function render($view, $params = []) { if (preg_match ("/\\.twig$/", $view)) $this->layout = false; $this->sendXAdditorHeaders(); return parent::render($view, $params); } }
\Yii::$app->view->disableDebugModule(); \Yii::$app->response->format = \yii\web\Response::FORMAT_RAW; \Yii::$app->response->headers->set('Content-Type', 'text/xml; charset=utf-8'); break; } $cHTML = $this->render($this->oPage->getTemplate(), array("oPage" => $this->oPage), true); $this->oPage->saveToCache(); return $cHTML; } public function actionMenu ()
$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) {
$pathInfo = $request->getPathInfo(); $request->parseVirtualFolders($pathInfo); // Prüfen, ob die gleiche URL bereits angefragt wurde und 404 oder 301 als Ergebnis hatte. // Bei 404 wird in der \yii\web\Application::$catchAll gesetzt und in parent::handleRequest() behandelt. $request->checkFailedRequest($pathInfo); return parent::handleRequest($request); } public function disableLogging(){ foreach (\Yii::$app->log->targets as $cKey => $oLogTarget) { $oLogTarget->enabled = false; };
{ 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();
$application = new \Additor\components\console\Application($env); } else { $env = \Additor\Modules::createEnvironment("web"); $application = new \Additor\components\web\Application($env); } $exitCode = $application->run(); exit($exitCode);
<?php require "protected/yii.php";
$_GET = [ 'PageID' => 1, ]; $_SESSION = [ '__flash' => [], 'EditMode' => false, 'ImpersonatedUserID' => 0, 'ImpersonatedGroupID' => 0, 'LastVisitedPageIDs' => [ 1, ], 'LastModifiedPageIDs' => [], 'LastSelectedPageIDs' => [], 'LastSelectedUserOrGroupsCodes' => [], 'CreateEntryTypes' => [], 'EditEntryTypes' => [], 'ExtraUsergroupIDs' => [], 'IsIntranet' => false, 'DEBUG' => [], 'WATCH' => [], ];