[Flow] Create Link outside of controller

Bastian Waidelich bastian at typo3.org
Wed Apr 9 12:39:11 CEST 2014


Christian Loock wrote:

Hi Christian,

> when I am not inside a controller [...]

Where are you then?


> Is there a simple way to generate an URL inside Flow when not being in
> the context of a controller?

There are several but it really depends on what the context *is*.
If you really have no access to the current action- or HTTP request you 
can create one with:

$httpRequest = Request::createFromEnvironment();
$actionRequest = $httpRequest->createActionRequest();

But note that the second line is not public API and subject to change.

-- 
Bastian Waidelich


More information about the Flow mailing list