我如何将参数传递给启用通量的控制器,以便控制器操作识别它?
我使用构建器创建了一个扩展,并将以下方法添加到 ContentController。
/**
* @param string $var
*/
public function exampleAction($var = null) {
var_dump($var);
die;
}
Run Code Online (Sandbox Code Playgroud)
但无论我如何将参数添加到 URL,结果都只是“null”。
扩展目录是“test” $_EXTKEY,. 构建器将“Mac.Test”放入其中ext_tables.php以调用registerProviderExtensionKey()。所以在 URL 中我尝试了这些参数:
http://host/index.php?id=1&tx_test_content[var]=abc
http://host/index.php?id=1&tx_test[var]=abc
http://host/index.php?id=1&tx_mactest_content[var]=abc
http://host/index.php?id=1&tx_mactest[var]=abc
http://host/index.php?id=1&var=abc
Run Code Online (Sandbox Code Playgroud)
和其他一些。但无济于事。
我尝试使用f:link.actionViewHelper,结果是
http://localhost/test2/index.php?id=1&no_cache=1&tx_test_content[member]=foo&tx_test_content[action]=example&tx_test_content[controller]=Content
另外 $this->request->getArguments() 只返回一个空数组,因此肯定存在严重错误。
使用的版本:
PHP 5.6.11
TYPO3 6.2.21
vhs 2.4.0
Flux 7.2.3
Fluidpages 3.3.1
FluidContent 4.3.3
FluidContent_Core 1.3.0
builder 1.0.0
没有安装其他任何东西(新系统只是为了测试此行为)。