\Twig_Template
Default base class for compiled templates.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Twig_Template
implements
Twig_TemplateInterface
{
- // members
- protected array $cache;
- protected $parent;
- protected $parents;
- protected $env;
- protected $blocks;
- protected $traits;
- // methods
- public void __construct()
- public abstract string getTemplateName()
- public void getEnvironment()
- public Twig_TemplateInterface|false getParent()
- protected void doGetParent()
- public void isTraitable()
- public void displayParentBlock()
- public void displayBlock()
- public string renderParentBlock()
- public string renderBlock()
- public Boolean hasBlock()
- public array getBlockNames()
- public array getBlocks()
- public void display()
- public void render()
- protected void displayWithErrorHandling()
- protected abstract void doDisplay()
- protected final The getContext()
- protected mixed getAttribute()
- public static void clearCache()
Hierarchy
Implements
Constants
Name | Value |
---|---|
ANY_CALL | 'any' |
ARRAY_CALL | 'array' |
METHOD_CALL | 'method' |
Members
protected
- $blocks
- $cache
- $env
- $parent
- $parents
- $traits
Methods
protected
- displayWithErrorHandling()
- doDisplay() — Auto-generated method to display the template with the given context.
- doGetParent()
- getAttribute() — Returns the attribute value for a given array/object.
- getContext() — Returns a variable from the context.
public
- __construct() — Constructor.
- clearCache() — This method is only useful when testing Twig. Do not use it.
- display() — {@inheritdoc}
- displayBlock() — Displays a block.
- displayParentBlock() — Displays a parent block.
- getBlockNames() — Returns all block names.
- getBlocks() — Returns all blocks.
- getEnvironment() — {@inheritdoc}
- getParent() — Returns the parent template.
- getTemplateName() — Returns the template name.
- hasBlock() — Returns whether a block exists or not.
- isTraitable()
- render() — {@inheritdoc}
- renderBlock() — Renders a block.
- renderParentBlock() — Renders a parent block.