File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -161,10 +161,10 @@ ExpressionVoter
161
161
~~~~~~~~~~~~~~~
162
162
163
163
The :class: `Symfony\\ Component\\ Security\\ Core\\ Authorization\\ Voter\\ ExpressionVoter `
164
- supports :class: ` Symfony \\ Component \\ ExpressionLanguage \\ Expression ` attributes
165
- and grants access based on the evaluation of expression (see :doc: `/security/expressions ` )
166
-
167
- .. code-block :: php
164
+ grants access based on the evaluation of expressions created with the
165
+ :doc: `ExpressionLanguage component < /components/expression_language >`. These
166
+ expressions have access to a number of
167
+ :ref: ` special security variables < security-expression-variables >`::
168
168
169
169
use Symfony\Component\ExpressionLanguage\Expression;
170
170
use Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter;
@@ -190,7 +190,7 @@ and grants access based on the evaluation of expression (see :doc:`/security/exp
190
190
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
191
191
)
192
192
193
- $vote = $expressionVoter->vote($token, $object, array( $expression) );
193
+ $vote = $expressionVoter->vote($token, $object, [ $expression] );
194
194
195
195
.. note ::
196
196
You can’t perform that action at this time.
0 commit comments