[TYPO3-mvc] viewHelper for URIs can't access Enviroment

David Bruchmann david at bruchmann-web.de
Sun Aug 1 16:48:13 CEST 2010


----- Ursprüngliche Nachricht -----
Von: Steffen Ritter <info at rs-websystems.de>
Gesendet: Sonntag, 1. August 2010 10:29:06
An:
CC:
Betreff: Re: [TYPO3-mvc] viewHelper for URIs can't access Enviroment
> Am 01.08.2010 06:32, schrieb David Bruchmann:
>> Hi,
>>
>> trying to write a viewHelper for extended URI-Handling / -Methods I need
>> the enviroment i.e. simply the calling controller-name.
> $this->getControllerContext()->getRequest()->getControllerActionName();
> $this->getControllerContext()->getRequest()->getControllerExtensionName();
> $this->getControllerContext()->getRequest()->getControllerName();
> $this->getControllerContext()->getRequest()->getArguments()
> ...
>
> $this->templateVariableContainer->get('settings');
>
> What do you miss?
>


Hi Steffen,

thanks a lot!
That's exactly what I searched for and through the class 
Tx_Extbase_MVC_Web_Request I got additional needed vars whereas the call 
keeps exactly the same.
 From inside of a ViewHelper the call is in general a bit different, i.e.
$this->controllerContext->getRequest()->getBaseURI();

Best Regards,
David


More information about the TYPO3-project-typo3v4mvc mailing list