Skip to content

Commit c3f8c85

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: Improve is_granted documentation Replace extra ... Mentioned the 60 second timeout of processes fix #310430: DomCrawler component selectButton() docs update
2 parents eade86b + a92d44b commit c3f8c85

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

components/dom_crawler.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,13 @@ Forms
395395
~~~~~
396396

397397
Special treatment is also given to forms. A ``selectButton()`` method is
398-
available on the Crawler which returns another Crawler that matches a button
399-
(``input[type=submit]``, ``input[type=image]``, or a ``button``) with the
400-
given text. This method is especially useful because you can use it to return
398+
available on the Crawler which returns another Crawler that matches ``<button>``
399+
or ``<input type="submit">`` or ``<input type="button">`` elements (or an
400+
``<img>`` element inside them). The string given as argument is looked for in
401+
the ``id``, ``alt``, ``name``, and ``value`` attributes and the text content of
402+
those elements.
403+
404+
This method is especially useful because you can use it to return
401405
a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
402406
form that the button lives in::
403407

components/process.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ instead::
330330
Process Timeout
331331
---------------
332332

333-
You can limit the amount of time a process takes to complete by setting a
334-
timeout (in seconds)::
333+
By default processes have a timeout of 60 seconds, but you can change it passing
334+
a different timeout (in seconds) to the ``setTimeout()`` method::
335335

336336
use Symfony\Component\Process\Process;
337337

reference/twig_reference.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,19 @@ is_granted
298298
{{ is_granted(role, object = null, field = null) }}
299299
300300
``role``
301-
**type**: ``string``
301+
**type**: ``string``, ``string[]``
302302
``object`` *(optional)*
303303
**type**: ``object``
304304
``field`` *(optional)*
305305
**type**: ``string``
306306

307-
Returns ``true`` if the current user has the required role. Optionally,
308-
an object can be pasted to be used by the voter. More information can be
309-
found in :ref:`security-template`.
307+
Returns ``true`` if the current user has the given role. If several roles are
308+
passed in an array, returns ``true`` if the user has all of them or at least one
309+
of them, depending on the value of this option:
310+
:ref:`security.access_decision_manager.strategy <security-voters-change-strategy>`.
311+
312+
Optionally, an object can be passed to be used by the voter. More information
313+
can be found in :ref:`security-template`.
310314

311315
logout_path
312316
~~~~~~~~~~~

service_container/autowiring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ An Autowiring Example
1919
---------------------
2020

2121
Imagine you're building an API to publish statuses on a Twitter feed, obfuscated
22-
with `ROT13`_... a fun encoder that shifts all characters 13 letters forward in
22+
with `ROT13`_, a fun encoder that shifts all characters 13 letters forward in
2323
the alphabet.
2424

2525
Start by creating a ROT13 transformer class::

0 commit comments

Comments
 (0)