从Extbase Controller设置TypoScript?

时间:2016-04-04 12:19:31

标签: php typo3 typoscript extbase typo3-6.2.x

如何直接从我的Extbase(6.2)的控制器设置TS设置?

所以这里:

/**
 * action show
 *
 * @param \STUBR\Apievents\Domain\Model\Event $event
 * @return void
 */
public function showAction(\STUBR\Apievents\Domain\Model\Event $event) {

    // Set plugin.tx_apievents_displayevents.settings.something to value x
    // --> how?

    // go on

    $this->view->assign('event', $event);
}

所以我可以在setup.txt

中做
lib.something < plugin.tx_apievents_displayevents.settings.something

但是怎么样?

1 个答案:

答案 0 :(得分:0)

This is essentially what a userFunc does. See https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/UserAndUserInt/Index.html However TS is usually used for configuration that is being used by code. Not the other way around. If you're looking for a way to store temporary values you could also look at the cache manager. What are you trying to do here?