ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Node_Embed Class Reference

Represents an embed node. More...

+ Inheritance diagram for Twig_Node_Embed:
+ Collaboration diagram for Twig_Node_Embed:

Public Member Functions

 __construct ($name, $index, Twig_Node_Expression $variables=null, $only=false, $ignoreMissing=false, $lineno, $tag=null)
 
- Public Member Functions inherited from Twig_Node_Include
 __construct (Twig_Node_Expression $expr, Twig_Node_Expression $variables=null, $only=false, $ignoreMissing=false, $lineno, $tag=null)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
- Public Member Functions inherited from Twig_Node
 __construct (array $nodes=array(), array $attributes=array(), $lineno=0, $tag=null)
 Constructor. More...
 
 __toString ()
 
 toXml ($asDom=false)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
 getTemplateLine ()
 
 getLine ()
 
 getNodeTag ()
 
 hasAttribute ($name)
 
 getAttribute ($name)
 
 setAttribute ($name, $value)
 
 removeAttribute ($name)
 
 hasNode ($name)
 
 getNode ($name)
 
 setNode ($name, $node=null)
 
 removeNode ($name)
 
 count ()
 
 getIterator ()
 
 setTemplateName ($name)
 
 getTemplateName ()
 
 setFilename ($name)
 
 getFilename ()
 

Protected Member Functions

 addGetTemplate (Twig_Compiler $compiler)
 
- Protected Member Functions inherited from Twig_Node_Include
 addGetTemplate (Twig_Compiler $compiler)
 
 addTemplateArguments (Twig_Compiler $compiler)
 

Additional Inherited Members

- Protected Attributes inherited from Twig_Node
 $nodes
 
 $attributes
 
 $lineno
 
 $tag
 

Detailed Description

Represents an embed node.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file Embed.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Node_Embed::__construct (   $name,
  $index,
Twig_Node_Expression  $variables = null,
  $only = false,
  $ignoreMissing = false,
  $lineno,
  $tag = null 
)

Definition at line 20 of file Embed.php.

References $index, Twig_Node\$lineno, Twig_Node\$name, Twig_Node\$tag, and Twig_Node\setAttribute().

21  {
22  parent::__construct(new Twig_Node_Expression_Constant('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
23 
24  $this->setAttribute('name', $name);
25  // to be removed in 2.0, used name instead
26  $this->setAttribute('filename', $name);
27  $this->setAttribute('index', $index);
28  }
$lineno
Definition: Node.php:22
$index
Definition: metadata.php:60
setAttribute($name, $value)
Definition: Node.php:165
+ Here is the call graph for this function:

Member Function Documentation

◆ addGetTemplate()

Twig_Node_Embed::addGetTemplate ( Twig_Compiler  $compiler)
protected

Definition at line 30 of file Embed.php.

References Twig_Node\getAttribute(), Twig_Node\getTemplateLine(), Twig_Node\getTemplateName(), and Twig_Compiler\write().

31  {
32  $compiler
33  ->write('$this->loadTemplate(')
34  ->string($this->getAttribute('name'))
35  ->raw(', ')
36  ->repr($this->getTemplateName())
37  ->raw(', ')
38  ->repr($this->getTemplateLine())
39  ->raw(', ')
40  ->string($this->getAttribute('index'))
41  ->raw(')')
42  ;
43  }
getTemplateName()
Definition: Node.php:229
getAttribute($name)
Definition: Node.php:152
getTemplateLine()
Definition: Node.php:121
write()
Writes a string to the compiled code by adding indentation.
Definition: Compiler.php:124
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: