W3cubDocs

/Symfony 2.7

Symfony\Bundle\SecurityBundle\Templating\Helper\SecurityHelper

class SecurityHelper extends Helper

SecurityHelper provides read-only access to the security context.

Methods

setCharset(string $charset)

Sets the default charset.

from Helper
string getCharset()

Gets the default charset.

from Helper
__construct(SecurityContextInterface $context = null)

Constructor.

isGranted($role, $object = null, $field = null)
string getName()

Returns the canonical name of this helper.

Details

public setCharset(string $charset)

Sets the default charset.

Parameters

string $charset The charset

public string getCharset()

Gets the default charset.

Return Value

string The default charset

public __construct(SecurityContextInterface $context = null)

Constructor.

Parameters

SecurityContextInterface $context A SecurityContext instance

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

Parameters

$role
$object
$field

public string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.html