Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有两个插件的扩展,我需要从这两个插件访问 getVars。
$this->request->getArguments();
当然,上面的代码只给了我当前插件的变量。
有人知道我如何从不同的插件访问 Vars 吗?
非常感谢!
干杯,
路飞
在扩展中,您无权访问其他扩展的请求参数。这只能使用旧方式通过
$_REQUEST或者\TYPO3\CMS\Core\Utility\GeneralUtility::_GP("varname");
$_REQUEST
\TYPO3\CMS\Core\Utility\GeneralUtility::_GP("varname");
查看: \TYPO3\CMS\Core\Utility\DebugUtility::debug($_REQUEST);获取正确的数组键和 var 名称。
\TYPO3\CMS\Core\Utility\DebugUtility::debug($_REQUEST);