composer require dcylabs/symfony-twig-helper dev-master
OR
"require": {
"dcylabs/symfony-twig-helper": "dev-master"
}
// app/AppKernel.php
$bundles = array(
// ...
new Dcylabs\TwigBundle\DcylabsTwigBundle(),
);
{% checkRoles '/myPath' %}
If I can read this I have the rights on the url : "{{ check_url }}"
{% else %}
I don't have the rights
{% endcheckRoles %}
{% checkRoles '/pathOne' '/pathTwo' '/pathThree' %}
If I can read this I have the rights on the urls : "{{ check_urls | join(';') }}"
{% else %}
I don't have the rights
{% endcheckRoles %}