Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita92d44b

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Improve is_granted documentation Mentioned the 60 second timeout of processes fix #310430: DomCrawler component selectButton() docs update
2 parentsd54ad7e +c5d5dbb commita92d44b

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

‎components/dom_crawler.rst‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,13 @@ Forms
404404
~~~~~
405405

406406
Special treatment is also given to forms. A ``selectButton()`` method is
407-
available on the Crawler which returns another Crawler that matches a button
408-
(``input[type=submit]``, ``input[type=image]``, or a ``button``) with the
409-
given text. This method is especially useful because you can use it to return
407+
available on the Crawler which returns another Crawler that matches ``<button>``
408+
or ``<input type="submit">`` or ``<input type="button">`` elements (or an
409+
``<img>`` element inside them). The string given as argument is looked for in
410+
the ``id``, ``alt``, ``name``, and ``value`` attributes and the text content of
411+
those elements.
412+
413+
This method is especially useful because you can use it to return
410414
a:class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
411415
form that the button lives in::
412416

‎components/process.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ instead::
320320
Process Timeout
321321
---------------
322322

323-
You can limit the amountoftime a process takes to complete by setting a
324-
timeout (in seconds)::
323+
By default processes have a timeoutof60 seconds, but you can change it passing
324+
a differenttimeout (in seconds) to the ``setTimeout()`` method::
325325

326326
use Symfony\Component\Process\Process;
327327

‎reference/twig_reference.rst‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,19 @@ is_granted
286286
{{ is_granted(role, object = null, field = null) }}
287287
288288
``role``
289-
**type**: ``string``
289+
**type**: ``string``, ``string[]``
290290
``object`` *(optional)*
291291
**type**: ``object``
292292
``field`` *(optional)*
293293
**type**: ``string``
294294

295-
Returns ``true`` if the current user has the required role. Optionally,
296-
an object can be pasted to be used by the voter. More information can be
297-
found in:ref:`security-template`.
295+
Returns ``true`` if the current user has the given role. If several roles are
296+
passed in an array, returns ``true`` if the user has all of them or at least one
297+
of them, depending on the value of this option:
298+
:ref:`security.access_decision_manager.strategy<security-voters-change-strategy>`.
299+
300+
Optionally, an object can be passed to be used by the voter. More information
301+
can be found in:ref:`security-template`.
298302

299303
..note::
300304

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp