TwigExtension::escapePlaceholder

public TwigExtension::escapePlaceholder($env, $string) Provides a placeholder wrapper around ::escapeFilter. Parameters \Twig_Environment $env: A Twig_Environment instance. mixed $string: The value to be escaped. Return value string|null The escaped, rendered output, or NULL if there is no valid output. File core/lib/Drupal/Core/Template/TwigExtension.php, line 378 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function escape

TwigExtension

A class providing Drupal Twig extensions. This provides a Twig extension that registers various Drupal-specific extensions to Twig, specifically Twig functions, filter, and node visitors. Hierarchy class \Drupal\Core\Template\TwigExtension extends \Twig_Extension See also \Drupal\Core\CoreServiceProvider File core/lib/Drupal/Core/Template/TwigExtension.php, line 26 Namespace Drupal\Core\Template Members Name Modifiers Type Description TwigExtension::$dateFormatter protected

TwigExtension::$urlGenerator

The URL generator. Type: \Drupal\Core\Routing\UrlGeneratorInterface File core/lib/Drupal/Core/Template/TwigExtension.php, line 33 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code protected $urlGenerator;

TwigExtension::$themeManager

The theme manager. Type: \Drupal\Core\Theme\ThemeManagerInterface File core/lib/Drupal/Core/Template/TwigExtension.php, line 47 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code protected $themeManager;

TwigExtension::$dateFormatter

The date formatter. Type: \Drupal\Core\Datetime\DateFormatterInterface File core/lib/Drupal/Core/Template/TwigExtension.php, line 54 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code protected $dateFormatter;

TwigExtension::$renderer

The renderer. Type: \Drupal\Core\Render\RendererInterface File core/lib/Drupal/Core/Template/TwigExtension.php, line 40 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code protected $renderer;

TwigEnvironment::getTemplateClass

public TwigEnvironment::getTemplateClass($name, $index = NULL) Gets the template class associated with the given string. Parameters string $name: The name for which to calculate the template class name. int $index: The index if it is an embedded template. Return value string The template class name. Overrides Twig_Environment::getTemplateClass File core/lib/Drupal/Core/Template/TwigEnvironment.php, line 79 Class TwigEnvironment A class that defines a Twig environment for Drupal. Namesp

TwigEnvironment::__construct

public TwigEnvironment::__construct($root, CacheBackendInterface $cache, $twig_extension_hash, \Twig_LoaderInterface $loader = NULL, $options = array()) Constructs a TwigEnvironment object and stores cache and storage internally. Parameters string $root: The app root. \Drupal\Core\Cache\CacheBackendInterface $cache: The cache bin. string $twig_extension_hash: The Twig extension hash. \Twig_LoaderInterface $loader: The Twig loader or loader chain. array $options: The options for the Twig enviro

TwigEnvironment::renderInline

public TwigEnvironment::renderInline($template_string, array $context = array()) Renders a twig string directly. Warning: You should use the render element 'inline_template' together with the #template attribute instead of this method directly. On top of that you have to ensure that the template string is not dynamic but just an ordinary static php string, because there may be installations using read-only PHPStorage that want to generate all possible twig templates as part of a build step. So

TrustedRedirectResponse::setTrustedTargetUrl

public TrustedRedirectResponse::setTrustedTargetUrl($url) Sets the target URL to a trusted URL. Parameters string $url: A trusted URL. Return value $this File core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php, line 37 Class TrustedRedirectResponse Provides a redirect response which contains trusted URLs. Namespace Drupal\Core\Routing Code public function setTrustedTargetUrl($url) { $this->trustedUrls[$url] = TRUE; return $this->setTargetUrl($url); }