TwigEnvironment

A class that defines a Twig environment for Drupal.

Instances of this class are used to store the configuration and extensions, and are used to load templates from the file system or other locations.

Hierarchy

See also

core\vendor\twig\twig\lib\Twig\Environment.php

File

core/lib/Drupal/Core/Template/TwigEnvironment.php, line 16

Namespace

Drupal\Core\Template

Members

Name Modifiers Type Description
TwigEnvironment::$templateClasses protected property Static cache of template classes.
TwigEnvironment::getTemplateClass public function Gets the template class associated with the given string. Overrides Twig_Environment::getTemplateClass
TwigEnvironment::renderInline public function Renders a twig string directly.
TwigEnvironment::__construct public function Constructs a TwigEnvironment object and stores cache and storage internally. Overrides Twig_Environment::__construct
Twig_Environment::$autoReload protected property
Twig_Environment::$baseTemplateClass protected property
Twig_Environment::$bcGetCacheFilename private property
Twig_Environment::$bcWriteCacheFile private property
Twig_Environment::$binaryOperators protected property
Twig_Environment::$cache protected property
Twig_Environment::$charset protected property
Twig_Environment::$compiler protected property
Twig_Environment::$debug protected property
Twig_Environment::$extensionInitialized protected property
Twig_Environment::$extensions protected property
Twig_Environment::$filterCallbacks protected property
Twig_Environment::$filters protected property
Twig_Environment::$functionCallbacks protected property
Twig_Environment::$functions protected property
Twig_Environment::$globals protected property
Twig_Environment::$lastModifiedExtension private property
Twig_Environment::$lexer protected property
Twig_Environment::$loadedTemplates protected property
Twig_Environment::$loader protected property
Twig_Environment::$originalCache private property
Twig_Environment::$parser protected property
Twig_Environment::$parsers protected property
Twig_Environment::$runtimeInitialized protected property
Twig_Environment::$staging protected property
Twig_Environment::$strictVariables protected property
Twig_Environment::$templateClassPrefix protected property
Twig_Environment::$tests protected property
Twig_Environment::$unaryOperators protected property
Twig_Environment::$visitors protected property
Twig_Environment::addExtension public function Registers an extension.
Twig_Environment::addFilter public function Registers a Filter.
Twig_Environment::addFunction public function Registers a Function.
Twig_Environment::addGlobal public function Registers a Global.
Twig_Environment::addNodeVisitor public function Registers a Node Visitor.
Twig_Environment::addTest public function Registers a Test.
Twig_Environment::addTokenParser public function Registers a Token Parser.
Twig_Environment::clearCacheFiles Deprecated public function Clears the template cache files on the filesystem.
Twig_Environment::clearTemplateCache Deprecated public function Clears the internal template cache.
Twig_Environment::compile public function Compiles a node and returns the PHP code.
Twig_Environment::compileSource public function Compiles a template source code.
Twig_Environment::computeAlternatives Deprecated public function
Twig_Environment::createTemplate public function Creates a template from source.
Twig_Environment::disableAutoReload public function Disables the auto_reload option.
Twig_Environment::disableDebug public function Disables debugging mode.
Twig_Environment::disableStrictVariables public function Disables the strict_variables option.
Twig_Environment::display public function Displays a template.
Twig_Environment::enableAutoReload public function Enables the auto_reload option.
Twig_Environment::enableDebug public function Enables debugging mode.
Twig_Environment::enableStrictVariables public function Enables the strict_variables option.
Twig_Environment::getBaseTemplateClass public function Gets the base template class for compiled templates.
Twig_Environment::getBinaryOperators public function Gets the registered binary Operators.
Twig_Environment::getCache public function Gets the current cache implementation.
Twig_Environment::getCacheFilename Deprecated public function Gets the cache filename for a given template.
Twig_Environment::getCharset public function Gets the default template charset.
Twig_Environment::getCompiler public function Gets the Compiler instance.
Twig_Environment::getExtension public function Gets an extension by name.
Twig_Environment::getExtensions public function Returns all registered extensions.
Twig_Environment::getFilter public function Get a filter by name.
Twig_Environment::getFilters public function Gets the registered Filters.
Twig_Environment::getFunction public function Get a function by name.
Twig_Environment::getFunctions public function Gets registered functions.
Twig_Environment::getGlobals public function Gets the registered Globals.
Twig_Environment::getLexer public function Gets the Lexer instance.
Twig_Environment::getLoader public function Gets the Loader instance.
Twig_Environment::getNodeVisitors public function Gets the registered Node Visitors.
Twig_Environment::getParser public function Gets the Parser instance.
Twig_Environment::getTags public function Gets registered tags.
Twig_Environment::getTemplateClassPrefix Deprecated public function Gets the template class prefix.
Twig_Environment::getTest public function Gets a test by name.
Twig_Environment::getTests public function Gets the registered Tests.
Twig_Environment::getTokenParsers public function Gets the registered Token Parsers.
Twig_Environment::getUnaryOperators public function Gets the registered unary Operators.
Twig_Environment::hasExtension public function Returns true if the given extension is registered.
Twig_Environment::initExtension protected function
Twig_Environment::initExtensions protected function
Twig_Environment::initGlobals protected function
Twig_Environment::initRuntime Deprecated public function Initializes the runtime environment.
Twig_Environment::isAutoReload public function Checks if the auto_reload option is enabled.
Twig_Environment::isDebug public function Checks if debug mode is enabled.
Twig_Environment::isStrictVariables public function Checks if the strict_variables option is enabled.
Twig_Environment::isTemplateFresh public function Returns true if the template is still fresh.
Twig_Environment::loadTemplate public function Loads a template by name.
Twig_Environment::mergeGlobals public function Merges a context with the defined globals.
Twig_Environment::parse public function Converts a token stream to a node tree.
Twig_Environment::registerUndefinedFilterCallback public function
Twig_Environment::registerUndefinedFunctionCallback public function
Twig_Environment::removeExtension Deprecated public function Removes an extension by name.
Twig_Environment::render public function Renders a template.
Twig_Environment::resolveTemplate public function Tries to load a template consecutively from an array.
Twig_Environment::setBaseTemplateClass public function Sets the base template class for compiled templates.
Twig_Environment::setCache public function Sets the current cache implementation.
Twig_Environment::setCharset public function Sets the default template charset.
Twig_Environment::setCompiler public function Sets the Compiler instance.
Twig_Environment::setExtensions public function Registers an array of extensions.
Twig_Environment::setLexer public function Sets the Lexer instance.
Twig_Environment::setLoader public function Sets the Loader instance.
Twig_Environment::setParser public function Sets the Parser instance.
Twig_Environment::tokenize public function Tokenizes a source code.
Twig_Environment::VERSION constant
Twig_Environment::writeCacheFile Deprecated protected function
doc_Drupal
2016-10-29 09:49:36
Comments
Leave a Comment

Please login to continue.