Skip to content

Commit 59c60b1

Browse files
inoryyweaverryan
authored andcommitted
add fixes to abstract_voter include file
1 parent e9053c0 commit 59c60b1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: cookbook/security/abstract_voter.rst.inc

+6-2
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)