W3cubDocs

/Symfony 2.7

Symfony\Bridge\Twig\Extension\SecurityExtension

class SecurityExtension extends Twig_Extension

SecurityExtension exposes security context features.

Methods

__construct(SecurityContextInterface $context = null)
isGranted($role, $object = null, $field = null)
getFunctions()

{@inheritdoc}

string getName()

Returns the name of the extension.

Details

public __construct(SecurityContextInterface $context = null)

Parameters

SecurityContextInterface $context

public isGranted($role, $object = null, $field = null)

Parameters

$role
$object
$field

public getFunctions()

{@inheritdoc}

public string getName()

Returns the name of the extension.

Return Value

string The extension name

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bridge/Twig/Extension/SecurityExtension.html