File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -396,10 +396,19 @@ given text. This method is especially useful because you can use it to return
396
396
a :class: `Symfony\\ Component\\ DomCrawler\\ Form ` object that represents the
397
397
form that the button lives in::
398
398
399
- $form = $crawler->selectButton('validate')->form();
399
+ // button example: <button id="my-super-button" type="submit">My super button</button>
400
+
401
+ // you can get button by its label
402
+ $form = $crawler->selectButton('My super button')->form();
403
+
404
+ // or by button id (#my-super-button) if the button doesn't have a label
405
+ $form = $crawler->selectButton('my-super-button')->form();
406
+
407
+ // or you can filter the whole form, for example a form has a class attribute: <form class="form-vertical" method="POST">
408
+ $crawler->filter('.form-vertical')->form();
400
409
401
410
// or "fill" the form fields with data
402
- $form = $crawler->selectButton('validate ')->form(array(
411
+ $form = $crawler->selectButton('my-super-button ')->form(array(
403
412
'name' => 'Ryan',
404
413
));
405
414
Original file line number Diff line number Diff line change @@ -453,8 +453,8 @@ Managing the Session
453
453
--------------------
454
454
455
455
Symfony provides a nice session object that you can use to store information
456
- about the user between requests. By default, Symfony stores the attributes in a
457
- cookie by using native PHP sessions.
456
+ about the user between requests. By default, Symfony stores the token in a
457
+ cookie and writes the attributes to a file by using native PHP sessions.
458
458
459
459
.. versionadded :: 3.3
460
460
The ability to request a ``Session `` instance in controllers was introduced
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ logic to a separate service::
239
239
{
240
240
$fileName = md5(uniqid()).'.'.$file->guessExtension();
241
241
242
- $file->move($this->targetDir , $fileName);
242
+ $file->move($this->getTargetDir() , $fileName);
243
243
244
244
return $fileName;
245
245
}
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ this request to an implementation of
190
190
This allows you to replace the way access decisions are reached without actually
191
191
modifying the ACL class itself.
192
192
193
- The ``PermissionGrantingStrategy `` first checks all your object-scope ACEs. If none
193
+ The ``PermissionGrantingStrategy `` first checks all your object-scope ACEs. If one
194
194
is applicable, the class-scope ACEs will be checked. If none is applicable,
195
195
then the process will be repeated with the ACEs of the parent ACL. If no
196
196
parent ACL exists, an exception will be thrown.
You can’t perform that action at this time.
0 commit comments