[TYPO3-mvc] piVars

Steffen Müller typo3 at t3node.com
Sun Jul 19 21:14:36 CEST 2009


Hi.

On 19.07.2009 13:46 Steffen Kamper wrote:
> is there an official way to get the specific GP-vars for a controller?
> I do it with t3lib_div::_GP(namespace) now.

$this->request

I'm not sure if this is 'official', but IMHO the easiest way to get what 
you are looking for.

see: Tx_Extbase_MVC_Web_Request

Tx_Extbase_MVC_Web_Request Object
(
     [method:protected] => GET
     [requestURI:protected] => 
http://lenny.test/index.php?id=17&tx_blogexample_pi1[blog][uid]=1&tx_blogexample_pi1[action]=index&tx_blogexample_pi1[controller]=Post&cHash=4c7b6f0c81
     [baseURI:protected] => http://lenny.test/
     [controllerObjectNamePattern:protected] => 
Tx_ at extension_Controller_@controllerController
     [viewObjectNamePattern:protected] => 
Tx_ at extension_View_@controller at action
     [pluginName:protected] => Pi1
     [controllerExtensionName:protected] => BlogExample
     [controllerName:protected] => Post
     [controllerActionName:protected] => index
     [arguments:protected] => Array
         (
             [blog] => Array
                 (
                     [uid] => 1
                 )

             [action] => index
             [controller] => Post
         )

     [dispatched:protected] => 1
)


-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Blubber on Twitter: http://twitter.com/t3node


More information about the TYPO3-project-typo3v4mvc mailing list