Created
February 11, 2021 11:19
-
-
Save localhorst/f2015cbe7f66c715b29587c88a8ef27e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Myself\MySitepackage\Hooks; | |
use TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface; | |
use TYPO3\CMS\Form\Domain\Runtime\FormRuntime; | |
/** | |
* @author Martin Terber <martin.terber@ppw.de> | |
*/ | |
class FormHooks | |
{ | |
/** | |
* @param \TYPO3\CMS\Form\Domain\Runtime\FormRuntime $formRuntime | |
* @param \TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface $renderable | |
* @return void | |
*/ | |
public function beforeRendering(FormRuntime $formRuntime, RootRenderableInterface $renderable) | |
{ | |
if ($renderable instanceof \TYPO3\CMS\Form\Domain\Model\FormDefinition) { | |
if (count($renderable->getPages()) > 1 ) { | |
$pages = $renderable->getPages(); | |
$renderable->setRenderingOption("navigation", $pages); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In your ext_localconf.php: