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

Commit2ecc541

Browse files
committed
Fix missing constant usage for generating urls
1 parente9760b2 commit2ecc541

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎book/routing.rst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,9 @@ By default, the router will generate relative URLs (e.g. ``/blog``). From
14791479
a controller, simply pass ``true`` to the third argument of the ``generateUrl()``
14801480
method::
14811481

1482-
$this->generateUrl('blog_show', array('slug' => 'my-blog-post'), true);
1482+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1483+
1484+
$this->generateUrl('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL);
14831485
// http://www.example.com/blog/my-blog-post
14841486

14851487
From a template, in Twig, simply use the ``url()`` function (which generates an absolute URL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp