[TYPO3-mvc] viewHelper for URIs can't access Enviroment
David Bruchmann
david at bruchmann-web.de
Thu Aug 5 22:30:00 CEST 2010
----- Ursprüngliche Nachricht -----
Von: Bastian Waidelich <bastian at typo3.org>
Gesendet: Mittwoch, 4. August 2010 10:05:53
Betreff: Re: [TYPO3-mvc] viewHelper for URIs can't access Enviroment
Hello Bastian,
thanks a lot for the explanation!
In short I wrote down these lines now whereas the first variable still
is noted statically:
$_EXTKEY = 'some_extension_key';
$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY);
$pluginName = $this->controllerContext->getRequest()->getPluginName();
$pluginSignature = strtolower($extensionName . '_' . $pluginName);
$pluginNamespace = 'tx_' . $pluginSignature;
and it works and seems being the same as
$this->data =
$this->controllerContext->getRequest()->getContentObjectData();
$pluginNamespace = 'tx_' . $this->data['list_type'];
Sense of retrieving the $pluginNamespace by one of the above noted
methods is to verify it with the incoming URL-parameters and devide
variables from the current controller from other controllers / plugins.
Furthermore I change the variables from the current controller as
mentioned in other posts from the default notation to the following one
that they include the CObjUid:
$pluginNamespace['CObjUid'][$Action]
This I realized in an own viewHelper and it works so far now.
Now I still have some questions:
1) is the prefix for the pluginNamespace always 'tx_'?
2) Are the results of both above noted methods always the same?
3) Has one method (dis-)advantages?
And finally I'd appreciate a tip where and how to write a modul that
reads the changed URLs in my extension.
Best Regards,
David
More information about the TYPO3-project-typo3v4mvc
mailing list