Refactor breadcrumb macro parameters in Workflow templates

Updated the breadcrumb macro's parameters to accept `entity_workflow` directly instead of a context object. This change affects the index, list, and macro_breadcrumb templates, ensuring consistent parameter usage and improving readability.

This avoid exploiting a bug which was solved in twig 3.15.0
This commit is contained in:
2024-11-19 12:58:20 +01:00
parent 3a1947df9e
commit 6ca4b91e1e
3 changed files with 5 additions and 5 deletions

View File

@@ -52,10 +52,10 @@
{% endif %}
{% endmacro %}
{% macro breadcrumb(_ctx) %}
{% macro breadcrumb(entity_workflow) %}
<div class="breadcrumb">
{% for step in _ctx.entity_workflow.stepsChained %}
{% set labels = workflow_metadata(_ctx.entity_workflow, 'label', step.currentStep, _ctx.entity_workflow.workflowName) %}
{% for step in entity_workflow.stepsChained %}
{% set labels = workflow_metadata(entity_workflow, 'label', step.currentStep, entity_workflow.workflowName) %}
{% set label = labels is null ? step.currentStep : labels|localize_translatable_string %}
{% set popTitle = _self.popoverTitle(step) %}
{% set popContent = _self.popoverContent(step) %}