Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

CoreExtension.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension;
8
9 use Twig_Extension;
10 use eZ\Publish\Core\MVC\Symfony\Templating\GlobalHelper;
11 use Twig_Extension_GlobalsInterface;
12
13 class CoreExtension extends Twig_Extension implements Twig_Extension_GlobalsInterface
14 {
16 private $globalHelper;
17
18 public function __construct(GlobalHelper $globalHelper)
19 {
20 $this->globalHelper = $globalHelper;
21 }
22
28 public function getName()
29 {
30 return 'ezpublish.core';
31 }
32
36 public function getGlobals()
37 {
38 return ['ezpublish' => $this->globalHelper];
39 }
40 }
eZ\Publish\Core\MVC\Symfony\Templating\GlobalHelper
Templating helper object globally accessible, through the "ezpublish" variable (in Twig).
Definition: GlobalHelper.php:21
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension
Definition: CoreExtension.php:14
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension\__construct
__construct(GlobalHelper $globalHelper)
Definition: CoreExtension.php:18
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension\getGlobals
getGlobals()
Definition: CoreExtension.php:36
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension\$globalHelper
$globalHelper
Definition: CoreExtension.php:16
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension\getName
getName()
Returns the name of the extension.
Definition: CoreExtension.php:28
eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension
Definition: ContentExtension.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.