add builer block context
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2024-05-15 18:28:24 +02:00
parent d1fa02d30a
commit 0469c32dc2
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -117,7 +117,7 @@ Create a template:
{# If it's a container: #}
{% for item in children %}
{{ item|block_to_html }}
{{ item|block_to_html(context) }}
{% endfor %}
</div>
```
@ -143,7 +143,7 @@ class CustomBlock extends BuilderBlock
{
// ...
public function buildVars(array $data)
public function buildVars(array $data, array $context)
{
$this->vars['bar'] = 'bar';
}