The aim of the HeaderManager is to send HTTP headers to the client. Beyond this, the class
guarantees, that URLs generated with the LinkGenerator can be used as well.
To make use of this component, it must be included into the current scope by
After that, the following static methods are available for use by the developer:
Forwards to the desired target url.
Redirects the user to the desired url. You can descide to send permanent redirect status or not.
This method is a generic function, that can be used to send any HTTP header (e.g. content-type,
...). For details, please have a look at
The following code box shows a typical application example:
$link = LinkGenerator::generateUrl(Url::fromCurrent()->mergeQuery(array('param1' => '','param2' => 'new_value')));
Do you want to add a comment to the article above, or do you want to post additional hints? So please click
Comments already posted can be found below.
There are no comments belonging to this article.