TwigExtension::getNodeVisitors

public TwigExtension::getNodeVisitors() File core/lib/Drupal/Core/Template/TwigExtension.php, line 179 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getNodeVisitors() { // The node visitor is needed to wrap all variables with // render_var -> TwigExtension->renderVar() function. return array( new TwigNodeVisitor(), ); }

TwigExtension::getName

public TwigExtension::getName() File core/lib/Drupal/Core/Template/TwigExtension.php, line 199 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getName() { return 'drupal_core'; }

TwigExtension::getLink

public TwigExtension::getLink($text, $url, $attributes = []) Gets a rendered link from a url object. Parameters string $text: The link text for the anchor tag as a translated string. \Drupal\Core\Url|string $url: The URL object or string used for the link. array|\Drupal\Core\Template\Attribute $attributes: An optional array or Attribute object of link attributes. Return value array A render array representing a link to the given URL. File core/lib/Drupal/Core/Template/TwigExtension.php, line

TwigExtension::getFunctions

public TwigExtension::getFunctions() File core/lib/Drupal/Core/Template/TwigExtension.php, line 123 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getFunctions() { return [ // This function will receive a renderable array, if an array is detected. new \Twig_SimpleFunction('render_var', array($this, 'renderVar')), // The url and path function are defined in close parallel to those found // in \Symfony\B

TwigExtension::getFilters

public TwigExtension::getFilters() File core/lib/Drupal/Core/Template/TwigExtension.php, line 144 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getFilters() { return array( // Translation filters. new \Twig_SimpleFilter('t', 't', array('is_safe' => array('html'))), new \Twig_SimpleFilter('trans', 't', array('is_safe' => array('html'))), // The "raw" filter is not detectable when parsing "trans"

TwigExtension::getActiveThemePath

public TwigExtension::getActiveThemePath() Gets the path of the active theme. Return value string The path to the active theme. File core/lib/Drupal/Core/Template/TwigExtension.php, line 306 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getActiveThemePath() { return $this->themeManager->getActiveTheme()->getPath(); }

TwigExtension::getActiveTheme

public TwigExtension::getActiveTheme() Gets the name of the active theme. Return value string The name of the active theme. File core/lib/Drupal/Core/Template/TwigExtension.php, line 296 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function getActiveTheme() { return $this->themeManager->getActiveTheme()->getName(); }

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::escapeFilter

public TwigExtension::escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $charset = NULL, $autoescape = FALSE) Overrides twig_escape_filter(). Replacement function for Twig's escape filter. Note: This function should be kept in sync with theme_render_and_autoescape(). @todo Refactor this to keep it in sync with theme_render_and_autoescape() in https://www.drupal.org/node/2575065 Parameters \Twig_Environment $env: A Twig_Environment instance. mixed $arg: The value to be escaped. str

TwigExtension::bubbleArgMetadata

protected TwigExtension::bubbleArgMetadata($arg) Bubbles Twig template argument's cacheability & attachment metadata. For example: a generated link or generated URL object is passed as a Twig template argument, and its bubbleable metadata must be bubbled. Parameters mixed $arg: A Twig template argument that is about to be printed. See also \Drupal\Core\GeneratedLink \Drupal\Core\GeneratedUrl \Drupal\Core\Theme\ThemeManager::render() \Drupal\Core\Render\RendererInterface::render() File cor