diff --git a/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php b/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php index 337ddabe8173ba2906bf2a02cc77bc3c1aa8fa9a..f7f50aefa7ac513be1c729df5dc7e3b9a2acbd1a 100644 --- a/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php +++ b/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php @@ -94,6 +94,14 @@ abstract class AbstractFinisher implements FinisherInterface $this->shortFinisherIdentifier = preg_replace('/Finisher$/', '', $this->finisherIdentifier); } + /** + * @return string + */ + public function getFinisherIdentifier(): string + { + return $this->finisherIdentifier; + } + /** * @param array $options configuration options in the format ['option1' => 'value1', 'option2' => 'value2', ...] */ diff --git a/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php b/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php index 927d173f81ae98da66eef02cc75e7612699270bd..92ff95975d7d15020487f43c0f1600f5e4103946 100644 --- a/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php +++ b/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php @@ -1044,8 +1044,12 @@ class FormRuntime implements RootRenderableInterface, \ArrayAccess $finisherIdentifier = ''; if ($this->getCurrentFinisher() !== null) { - $finisherIdentifier = (new \ReflectionClass($this->getCurrentFinisher()))->getShortName(); - $finisherIdentifier = preg_replace('/Finisher$/', '', $finisherIdentifier); + if (method_exists($this->getCurrentFinisher(), 'getFinisherIdentifier')) { + $finisherIdentifier = $this->getCurrentFinisher()->getFinisherIdentifier(); + } else { + $finisherIdentifier = (new \ReflectionClass($this->getCurrentFinisher()))->getShortName(); + $finisherIdentifier = preg_replace('/Finisher$/', '', $finisherIdentifier); + } } return GeneralUtility::makeInstance(