ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\Implementation\Render\ilTemplateWrapper Class Reference

Wraps an ilTemplate to only provide smaller interface. More...

+ Inheritance diagram for ILIAS\UI\Implementation\Render\ilTemplateWrapper:
+ Collaboration diagram for ILIAS\UI\Implementation\Render\ilTemplateWrapper:

Public Member Functions

 __construct (private ilTemplate $tpl,)
 
 setCurrentBlock (string $name)
 @inheritdocs More...
 
 parseCurrentBlock ()
 @inheritdocs More...
 
 touchBlock (string $name)
 @inheritdocs More...
 
 setVariable (string $name, $value)
 @inheritdocs More...
 
 get (?string $block=null)
 @inheritdocs More...
 
 setCurrentBlock (string $name)
 Set the block to work on. More...
 
 parseCurrentBlock ()
 Parse the block that is currently worked on. More...
 
 touchBlock (string $name)
 Touch a block without working further on it. More...
 
 setVariable (string $name, $value)
 Set a variable in the current block. More...
 
 get (?string $block=null)
 Get the rendered template or a specific block. More...
 

Detailed Description

Wraps an ilTemplate to only provide smaller interface.

Definition at line 29 of file ilTemplateWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::__construct ( private ilTemplate  $tpl)
final

Definition at line 31 of file ilTemplateWrapper.php.

33 {
34 }

Member Function Documentation

◆ get()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::get ( ?string  $block = null)

@inheritdocs

Implements ILIAS\UI\Implementation\Render\Template.

Definition at line 71 of file ilTemplateWrapper.php.

71 : string
72 {
73 if ($block === null) {
74 $block = "__global__";
75 }
76 return $this->tpl->get($block);
77 }

◆ parseCurrentBlock()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::parseCurrentBlock ( )

@inheritdocs

Implements ILIAS\UI\Implementation\Render\Template.

Definition at line 47 of file ilTemplateWrapper.php.

47 : bool
48 {
49 return $this->tpl->parseCurrentBlock();
50 }

◆ setCurrentBlock()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::setCurrentBlock ( string  $name)

@inheritdocs

Implements ILIAS\UI\Implementation\Render\Template.

Definition at line 39 of file ilTemplateWrapper.php.

39 : bool
40 {
41 return $this->tpl->setCurrentBlock($name);
42 }

◆ setVariable()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::setVariable ( string  $name,
  $value 
)

@inheritdocs

Implements ILIAS\UI\Implementation\Render\Template.

Definition at line 63 of file ilTemplateWrapper.php.

63 : void
64 {
65 $this->tpl->setVariable($name, $value);
66 }

◆ touchBlock()

ILIAS\UI\Implementation\Render\ilTemplateWrapper::touchBlock ( string  $name)

@inheritdocs

Implements ILIAS\UI\Implementation\Render\Template.

Definition at line 55 of file ilTemplateWrapper.php.

55 : bool
56 {
57 return $this->tpl->touchBlock($name);
58 }

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