DelayRenderFunction
extends BaseFunction
in package
DelayRender allows you to force rendered Twig code to the footer of the site. Helpful for javascript.
DelayRender will not all for duplicate code bits.
{% set javascript %}
<script>console.log('hello world');</script>
{% endset %}
{% do delayRender(javascript) %}
Table of Contents
- $keyStack : mixed
- $stack : mixed
- __construct() : mixed
- getDI() : mixed
- getFunctionName() : mixed
- getFunctionOptions() : mixed
- getStack() : array<string|int, mixed>
- Return the remaining items in the render stack if anything exists.
- handle() : array<string|int, mixed>
- Delay render handle
Properties
$keyStack
private
static mixed
$keyStack
= []
$stack
private
static mixed
$stack
= []
Methods
__construct()
public
__construct() : mixed
Return values
mixed —getDI()
public
getDI() : mixed
Return values
mixed —getFunctionName()
public
getFunctionName() : mixed
Return values
mixed —getFunctionOptions()
public
getFunctionOptions() : mixed
Return values
mixed —getStack()
Return the remaining items in the render stack if anything exists.
public
static getStack() : array<string|int, mixed>
Return values
array<string|int, mixed> —handle()
Delay render handle
public
handle([mixed $block = 'global' ][, mixed $val = null ]) : array<string|int, mixed>
Parameters
- $block : mixed = 'global'
- $val : mixed = null
Return values
array<string|int, mixed> —of existing partials