0

私はalohaエディタを介してパラメータを動的に渡したいと思っていました.yamlにこのような選択ボックスがあります

properties:
 events:
  type: string
  ui:
    label: 'Events'
    reloadIfChanged: TRUE
    inspector:
      group: 'document'
      editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
      editorOptions:
        dataSourceUri: 'events/list'

そして.ts2ファイルではこれを使用します

prototype(Festival.Backend:Events) < prototype(TYPO3.Neos:Plugin) {
    package = 'Festival.Backend'
    controller = 'Events'
    action = 'ast_view'
    artist = ${q(node).property('events')}
}

このチュートリアルhttp://docs.typo3.org/neos/TYPO3NeosDocumentation/Appendixes/NeosTypoScriptReference.html# では、次を使用してコントローラーにパラメーターを渡すことができると書かれています

argumentNamespace:
[key]:

私の質問は、「アーティスト」値をノード プロパティからコントローラ アクションに追加するにはどうすればよいですか? このようなもの

public function ast_viewAction($artist) {
    $this->view->assign('artist', $artist); 
}

ご清聴ありがとうございました

編集: Aske Ertmannのおかげで解決しました。関数をこれに変更します

 public function ast_viewAction() {
    $events_artist = $this->request->getInternalArgument('__artist');
    $this->view->assign('artist', $artist); 
}
4

1 に答える 1

2

TypoScript プラグイン オブジェクトからの引数は、リクエストの内部引数として使用でき、コントローラー アクションで使用できます。

/** @var \TYPO3\TYPO3CR\Domain\Model\Node $currentNode */
$currentNode = $this->request->getInternalArgument('__node');

いくつかの追加のヒントはここにあります

于 2015-02-16T06:33:34.937 に答える