We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 930aa63 commit 51f49ceCopy full SHA for 51f49ce
book/security/authorization.rst
@@ -153,17 +153,17 @@ syntax:
153
154
.. configuration-block::
155
156
- .. code-block:: php
+ .. code-block:: jinja
157
158
- <?php if ($view['security']->isGranted('ROLE_ADMIN')): ?>
+ {% if is_granted("ROLE_ADMIN") %}
159
<a href="...">Delete</a>
160
- <?php endif ?>
+ {% endif %}
161
162
- .. code-block:: jinja
+ .. code-block:: php
163
164
- {% if has_role("ROLE_ADMIN") %}
+ <?php if ($view['security']->isGranted('ROLE_ADMIN')): ?>
165
166
- {% endif %}
+ <?php endif ?>
167
168
.. note::
169
0 commit comments