i wanted to pass a parameter dynamically via aloha editor, i have select box like this on .yaml
properties:
events:
type: string
ui:
label: 'Events'
reloadIfChanged: TRUE
inspector:
group: 'document'
editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
dataSourceUri: 'events/list'
and on .ts2 file i use this
prototype(Festival.Backend:Events) < prototype(TYPO3.Neos:Plugin) {
package = 'Festival.Backend'
controller = 'Events'
action = 'ast_view'
artist = ${q(node).property('events')}
}
in this tutorial http://docs.typo3.org/neos/TYPO3NeosDocumentation/Appendixes/NeosTypoScriptReference.html# it says that i can pass a parameter to the controller using
argumentNamespace:
[key]:
my question is how do i add the 'artist' value from node property to the controller action? something like this
public function ast_viewAction($artist) {
$this->view->assign('artist', $artist);
}
thanks for your attention
EDIT: solved thanks to Aske Ertmann, change my function to this
public function ast_viewAction() {
$events_artist = $this->request->getInternalArgument('__artist');
$this->view->assign('artist', $artist);
}
The arguments from the TypoScript plugin object is available as internal arguments on the request, which is available in the controller action.
/** @var \TYPO3\TYPO3CR\Domain\Model\Node $currentNode */
$currentNode = $this->request->getInternalArgument('__node');
A few additional tips can be found here