Move the argument registrations away from the render() method
to initializeArguments(), to prevent any errors with PHP7 and
subclassed ViewHelpers if/when render() method signatures change.
Resolves: #77131
Releases: master
Change-Id: I4c49ba9fa609e21b7792c673807647c75c4542cd
Reviewed-on: https://review.typo3.org/49008
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
$this->childNodes = $childNodes;
}
+ /**
+ * Initialize arguments.
+ *
+ * @api
+ * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
+ */
+ public function initializeArguments()
+ {
+ parent::initializeArguments();
+ $this->registerArgument('defaultController', 'string', 'defaultController');
+ }
+
/**
* Render FunctionMenu
*
- * @param string $defaultController
* @return string
*/
- public function render($defaultController = null)
+ public function render()
{
$this->tag->addAttribute('onchange', 'jumpToUrl(this.options[this.selectedIndex].value, this);');
$options = '';