-
-
Save jp1987/5056567 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
/** | |
* @var \TYPO3\Flow\Mvc\Routing\UriBuilder | |
*/ | |
protected $uriBuilder; | |
/** | |
* @param \TYPO3\Flow\Configuration\ConfigurationManager $configurationManager | |
*/ | |
public function injectUriBuilder(\TYPO3\Flow\Configuration\ConfigurationManager $configurationManager) { | |
$flowSettings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow'); | |
$httpRequest = \TYPO3\Flow\Http\Request::create(new \TYPO3\Flow\Http\Uri('http://localhost')); | |
$httpRequest->injectSettings($flowSettings); | |
$request = new \TYPO3\Flow\Mvc\ActionRequest($httpRequest); | |
$uriBuilder = new \TYPO3\Flow\Mvc\Routing\UriBuilder(); | |
$uriBuilder->setRequest($request); | |
$uriBuilder->setCreateAbsoluteUri(TRUE); | |
$this->uriBuilder = $uriBuilder; | |
} | |
... | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment