File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,24 @@ the whole form or specific field(s)::
620
620
$form->disableValidation();
621
621
$form['country']->select('Invalid value');
622
622
623
+ Expanding URI
624
+ ~~~~~~~~~~~~~
625
+
626
+ .. versionadded :: 5.1
627
+
628
+ The UriExpander helper was added in Symfony 5.1.
629
+
630
+ The :class: `Symfony\\ Component\\ DomCrawler\\ UriExpander ` class provides method
631
+ to expand a relative link::
632
+
633
+ UriExpander::expand($uri, $currentUri);
634
+ // For example:
635
+ UriExpander::expand('/foo', 'http://localhost/bar/foo/'); // => 'http://localhost/foo'
636
+ UriExpander::expand('?a=b', 'http://localhost/bar#foo'; // => 'http://localhost/bar?a=b'
637
+ UriExpander::expand('../../', 'http://localhost/'; // => http://localhost/'
638
+
639
+ If you need to expand a relative link according to a base URL, you can use UriExpander
640
+
623
641
Learn more
624
642
----------
625
643
You can’t perform that action at this time.
0 commit comments