Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6161de

Browse filesBrowse files
inoryyjaviereguiluz
authored andcommitted
add fixes to abstract_voter include file
1 parent 71b8c61 commit e6161de
Copy full SHA for e6161de

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎cookbook/security/abstract_voter.rst.inc

Copy file name to clipboardExpand all lines: cookbook/security/abstract_voter.rst.inc
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ The basic functionality covering common use cases is provided
2121
and developer is expected to implement the abstract methods.
2222

2323
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter::getSupportedClasses`
24-
method is used to provide an array of supported classes, i.e. ['\Acme\DemoBundle\Model\Product']
24+
method tells Symfony that your voter should be called whenever an object of one of the given classes
25+
is passed to `isGranted` For example, if you return ['\Acme\DemoBundle\Model\Product'],
26+
Symfony will call your voter when a `Product` object is passed to `isGranted`.
2527

2628
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter::getSupportedAttributes`
27-
method is used to provide an array of supported attributes, i.e. ['CREATE', 'READ']
29+
method tells Symfony that your voter should be called whenever one of these strings is passes as the
30+
first argument to `isGranted`. For example, if you return `array('CREATE', 'READ')`, then
31+
Symfony will call your voter when one of these is passed to `isGranted`.
2832

2933
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter::isGranted`
3034
method must implement the business logic that verifies whether or not a given

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.