1
Wie konvertiere ich solche Logik in Twig 2.x?Twig komplexe Array-Konvertierung
<?php if (isset($pricerunner_category[$category['category_id']])) { echo $pricerunner_category[$category['category_id']]; } ?>
Wie konvertiere ich solche Logik in Twig 2.x?Twig komplexe Array-Konvertierung
<?php if (isset($pricerunner_category[$category['category_id']])) { echo $pricerunner_category[$category['category_id']]; } ?>
Sollte mit der Funktion möglich sein.
https://twig.symfony.com/doc/2.x/functions/attribute.html
{% if attribute(pricerunner_category, category.category_id) is defined %}
{{ attribute(pricerunner_category, category.category_id) }}
{% endif %}
nicht sicher, ob die is defined
notwendig ist oder nicht, hat es auf die Dokumentation basiert.