Skip to content

dcylabs/symfony-twig-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installing Dcylabs Twig Bundle

Updating composer.json

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

OR

  "require": {
      "dcylabs/symfony-twig-helper": "dev-master"
  }

Updating AppKernel.php

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

Using Dcylabs Twig Bundle

Checking roles

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages