if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getTemplateName(), $e);
}
}
{
$doc = new \DOMDocument();
$doc->loadHTML('<html><head>' . $input . '</head><body></body></html>');
$raw = [];
/** @var \DomElement $element */
foreach ($doc->getElementsByTagName('head')->item(0)->childNodes as $element) {
$result = ['tag' => $element->tagName, 'content' => $element->textContent];
foreach ($element->attributes as $attribute) {
$result[$attribute->name] = $attribute->value;
}
}
// If there are registered patterns, only handle errors if error matches one of the patterns.
if ($level & error_reporting()) {
foreach ($this->registeredPatterns as $entry) {
$pathMatches = (bool) preg_match($entry["pattern"], $file);
if ($pathMatches) {
return parent::handleError($level, $message, $file, $line);
}
}
{
$doc = new \DOMDocument();
$doc->loadHTML('<html><head>' . $input . '</head><body></body></html>');
$raw = [];
/** @var \DomElement $element */
foreach ($doc->getElementsByTagName('head')->item(0)->childNodes as $element) {
$result = ['tag' => $element->tagName, 'content' => $element->textContent];
foreach ($element->attributes as $attribute) {
$result[$attribute->name] = $attribute->value;
}
// line 2
echo " ";
$this->displayBlock('head_stylesheets', $context, $blocks);
// line 12
$this->displayBlock('head_platform', $context, $blocks);
$context["headStylesheets"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 14
$this->env->getExtension('UrlExtension')->parseAssetsFunc((isset($context["headStylesheets"]) ? $context["headStylesheets"] : null), "head", 10);
// line 16
echo "<head>";
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getTemplateFile()) {
}
/**
* {@inheritdoc}
*/
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
protected function doGetParent(array $context)
{
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getTemplateFile()) {
}
/**
* {@inheritdoc}
*/
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
";
}
// line 46
public function block_page_head($context, array $blocks = array())
{
// line 47
$this->loadTemplate("partials/page_head.html.twig", "@nucleus/page.html.twig", 47)->display($context);
}
} else {
$template = null;
$block = null;
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Twig_Error $e) {
throw $e;
echo ">
<html";
// line 45
echo $this->getAttribute($this->getAttribute((isset($context["gantry"]) ? $context["gantry"] : null), "page", array()), "htmlAttributes", array());
echo ">
";
// line 46
$this->displayBlock('page_head', $context, $blocks);
// line 49
echo " ";
} else {
$template = null;
$block = null;
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Twig_Error $e) {
throw $e;
// line 37
ob_start();
// line 38
echo " ";
$this->displayBlock('page_bottom', $context, $blocks);
$context["page_bottom"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 43
$this->displayBlock('page', $context, $blocks);
// line 66
$this->getAttribute($this->getAttribute((isset($context["gantry"]) ? $context["gantry"] : null), "platform", array()), "finalize", array(), "method");
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getTemplateFile()) {
}
/**
* {@inheritdoc}
*/
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
protected function doGetParent(array $context)
{
return "@nucleus/page.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getTemplateFile()) {
}
/**
* {@inheritdoc}
*/
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
* {@inheritdoc}
*/
public function render(array $context)
{
$level = ob_get_level();
ob_start();
try {
$this->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function render($name, array $context = array())
{
return $this->loadTemplate($name)->render($context);
}
}
public function render($file, array $context = array())
{
// Include Gantry specific things to the context.
$context = $this->add_to_context($context);
return $this->renderer()->render($file, $context);
}
$theme = $gantry['theme'];
$raw = JFactory::getApplication()->input->getString('type') == 'raw';
// Render the component.
echo $theme
->setLayout('_body_only')
->render($raw ? 'raw.html.twig' : 'component.html.twig');
if (file_exists($directory . '/' . $filename))
{
// Store the file path
$this->_file = $directory . '/' . $filename;
// Get the file content
ob_start();
require $directory . '/' . $filename;
$contents = ob_get_contents();
ob_end_clean();
// Assign the variables
$this->template = $template;
$this->baseurl = JUri::base(true);
$this->params = isset($params['params']) ? $params['params'] : new Registry;
// Load
$this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
return $this;
*
* @return JDocumentHTML instance of $this to allow chaining
*
* @since 11.1
*/
public function parse($params = array())
{
return $this->_fetchTemplate($params)->_parseTemplate();
}
// Fall back to constants.
else
{
$this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
}
// Parse the document.
$this->document->parse($this->docOptions);
// Trigger the onBeforeRender event.
{
$this->set('themeFile', $file . '.php');
}
break;
}
parent::render();
}
// Perform application routines.
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof JDocument)
{
// Render the application output.
$this->render();
}
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;
// Instantiate the application.
$app = JFactory::getApplication('site');
// Execute the application.
$app->execute();