2017 © Pedro Peláez
 

symfony-bundle symfony-twig-helper

A Twig Bundle that help you with rights in Symfony

image

dcylabs/symfony-twig-helper

A Twig Bundle that help you with rights in Symfony

  • Monday, March 14, 2016
  • by dcylabs
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Installing Dcylabs Twig Bundle

Updating composer.json

composer require dcylabs/symfony-twig-helper dev-master

OR ``` json "require": { "dcylabs/symfony-twig-helper": "dev-master" }, (*1)


## Updating AppKernel.php ``` php // app/AppKernel.php $bundles = array( // ... new Dcylabs\TwigBundle\DcylabsTwigBundle(), );

Using Dcylabs Twig Bundle

Checking roles

``` twig {% checkRoles '/myPath' %} If I can read this I have the rights on the url : "{{ check_url }}" {% else %} I don't have the rights {% endcheckRoles %}, (*2)


``` twig {% 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 %}

The Versions

14/03 2016

dev-master

9999999-dev

A Twig Bundle that help you with rights in Symfony

  Sources   Download

MIT

by Avatar dcylabs

symfony twig roles security helper bundle