如何在 twig 和 symfony2 中使用 OR 条件
How to use OR Condition in twig and symfony2
{% if ( session.get('userRole') != 'ROLE CLIENT USER' ) or ( session.get('actionPermission') == 'true' ) %}
{# do stuff #}
{% endif; %}
{% if (session.get('userRole') != 'ROLE CLIENT USER' or session.get('actionPermission') == 'true') %}
{# ... do stuff #}
{% endif %}
{% if ( session.get('userRole') != 'ROLE CLIENT USER' ) or ( session.get('actionPermission') == 'true' ) %}
{# do stuff #}
{% endif; %}
{% if (session.get('userRole') != 'ROLE CLIENT USER' or session.get('actionPermission') == 'true') %}
{# ... do stuff #}
{% endif %}