Template
class Template
Template.
Constants
LAYER_TOP |
|
LAYER_SNIPPET |
|
LAYER_LOCAL |
|
protected CONTENT_TYPE |
|
protected BLOCKS |
|
Properties
stdClass | $global | ||
protected array | $params | ||
protected FilterExecutor | $filters | ||
protected string|false|null | $parentName |
Methods
No description
No description
Returns array of all parameters.
Returns parameter.
No description
No description
No description
No description
No description
Renders template.
Renders template.
No description
No description
Renders block.
Renders parent block.
Creates block if doesn't exist and checks if content type is the same.
Captures output to string.
No description
No description
No description
No description
No description
No description
Details
at line 71
__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name, Policy|null $policy)
No description
at line 91
Engine
getEngine()
No description
at line 97
string
getName()
No description
at line 107
array
getParameters()
Returns array of all parameters.
at line 117
mixed
getParameter(string $name)
Returns parameter.
at line 130
array
getBlockNames(int|string $layer = self::LAYER_TOP)
No description
at line 136
string
getContentType()
No description
at line 142
string|null
getParentName()
No description
at line 148
Template|null
getReferringTemplate()
No description
at line 154
string|null
getReferenceType()
No description
at line 164
void
render(string|null $block = null)
internal |
Renders template.
at line 214
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 243
void
renderToContentType(string|Closure|null $mod, string|null $block = null)
internal |
No description
at line 255
void
prepare()
internal |
No description
at line 264
array
main()
internal |
No description
at line 280
void
renderBlock(string $name, array $params, string|Closure|null $mod = null, int|string $layer = null)
internal |
Renders block.
at line 308
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 325
protected void
addBlock(string $name, string $contentType, array $functions, int|string $layer = null)
internal |
Creates block if doesn't exist and checks if content type is the same.
at line 372
string
capture(callable $function)
internal |
Captures output to string.
at line 402
protected void
enterBlockLayer(int $staticId)
No description
at line 409
protected void
leaveBlockLayer()
No description
at line 415
bool
hasBlock(string $name)
No description
at line 429
protected mixed
call(mixed $callable)
internal |
No description
at line 462
protected mixed
prop(mixed $obj, mixed $prop)
internal |
No description
at line 475
mixed
__get(string $name)
No description
Traits
Better OOP experience.