<div class="gallery-header">
<h2>{# {{ page.show.one.galleryTitle }} #} Галерея</h2>
</div>
<div class="row">
{% set images = gallery[0].translatable.images %}
{% set main_path = '/data/images/gallery/'~gallery[0].translatable.path %}
<div class="col-sm-12">
<div class="gallery-fancybox">
<a class="gallery-view-one-current-image" href="{{ main_path|imagine_filter('watermark_filter') }}" data-fancybox="image">
<img src="{{ main_path|imagine_filter('watermark_filter') }}" alt="">
</div>
<div class=\"row\">
";
// line 16
$context["images"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["gallery"]) || array_key_exists("gallery", $context) ? $context["gallery"] : (function () { throw new RuntimeError('Variable "gallery" does not exist.', 16, $this->source); })()), 0, [], "array", false, false, false, 16), "translatable", [], "any", false, false, false, 16), "images", [], "any", false, false, false, 16);
// line 17
echo " ";
$context["main_path"] = ("/data/images/gallery/" . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["gallery"]) || array_key_exists("gallery", $context) ? $context["gallery"] : (function () { throw new RuntimeError('Variable "gallery" does not exist.', 17, $this->source); })()), 0, [], "array", false, false, false, 17), "translatable", [], "any", false, false, false, 17), "path", [], "any", false, false, false, 17));
// line 18
echo " <div class=\"col-sm-12\">
$macros = $this->macros;
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "GalleryBundle:Default:gallery_view_one.html.twig"));
$this->parent = $this->loadTemplate("::base.html.twig", "GalleryBundle:Default:gallery_view_one.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
* @final since version 3.4
*/
protected function render($view, array $parameters = [], Response $response = null)
{
if ($this->container->has('templating')) {
$content = $this->container->get('templating')->render($view, $parameters);
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
}
$em->persist($gallery[0]);
$em->flush();
}
// $images = $gallery[0]->getTranslatable()->getImages();
return $this->render("GalleryBundle:Default:gallery_view_one.html.twig", array('gallery' => $gallery));
}
public function galleryViewAllAction(Request $request, $page, $perpage)
{
// $galleries = $this->getDoctrine()->getRepository('GalleryBundle:Gallery')->getAllGallery();
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
RuntimeError |
---|
Twig\Error\RuntimeError: Key "0" does not exist as the array is empty. at src/GalleryBundle/Resources/views/Default/gallery_view_one.html.twig:16 at twig_get_attribute(object(Environment), object(Source), array(), 0, array(), 'array', false, false, false, 16) (var/cache/prod/twig/d0/d02cb4e22b8fd7f9aeb06392bd076d03971f7e822331a1bd20b463ad36abb9ee.php:75) at __TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af->block_body(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer), 'vote_cnt' => 0, 'vote_id' => 0), array('styles' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_styles'), 'body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'), 'script' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_script'))) (vendor/twig/twig/src/Template.php:184) at Twig\Template->displayBlock('body', array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer), 'vote_cnt' => 0, 'vote_id' => 0), array('styles' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_styles'), 'body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'), 'script' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_script'))) (var/cache/prod/twig/a2/a20d295267c213b02700e9609bb72af8d70741f9f6288685e5114d59a38ea0c0.php:415) at __TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8->doDisplay(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer), 'vote_cnt' => 0, 'vote_id' => 0), array('styles' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_styles'), 'body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'), 'script' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_script'))) (vendor/twig/twig/src/Template.php:407) at Twig\Template->displayWithErrorHandling(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer)), array('styles' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_styles'), 'body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'), 'script' => array(object(__TwigTemplate_8d37b7d43b1c59135eec596401f3fa823fc9cf182636c5994c97273be20cfdb8), 'block_script'))) (vendor/twig/twig/src/Template.php:380) at Twig\Template->display(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer)), array('body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'))) (var/cache/prod/twig/d0/d02cb4e22b8fd7f9aeb06392bd076d03971f7e822331a1bd20b463ad36abb9ee.php:45) at __TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af->doDisplay(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer)), array('body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'))) (vendor/twig/twig/src/Template.php:407) at Twig\Template->displayWithErrorHandling(array('gallery' => array(), 'app' => object(AppVariable), 'container' => object(appProdDebugProjectContainer)), array('body' => array(object(__TwigTemplate_abd4fa005cb2d3aa5c1efaa58b1b3ff6c0fd91ab234705782d0ddd295d7e44af), 'block_body'))) (vendor/twig/twig/src/Template.php:380) at Twig\Template->display(array('gallery' => array())) (vendor/twig/twig/src/Template.php:392) at Twig\Template->render(array('gallery' => array())) (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:50) at Symfony\Bridge\Twig\TwigEngine->render('GalleryBundle:Default:gallery_view_one.html.twig', array('gallery' => array())) (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:286) at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('GalleryBundle:Default:gallery_view_one.html.twig', array('gallery' => array())) (src/GalleryBundle/Controller/DefaultController.php:249) at GalleryBundle\Controller\DefaultController->galleryViewOneAction(object(Request), 'feierichne-vidkrittia-vidkrili-porto-franko2018') (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (web/app.php:22) |