Skip to content
Snippets Groups Projects
Commit 6ca6f803 authored by Sebastian Wagner's avatar Sebastian Wagner Committed by Christian Kuhn
Browse files

[BUGFIX] EXT:form - prevent duplicate call to getRecordAsJson

We prevent getRecordAsJson to be called twice when rendering element.
Fix annotations of for return values of JSON elements

Resolves: #74331
Change-Id: Ib4826ebeee33f91c18db230d1aba2ffe39070ea1
Reviewed-on: https://review.typo3.org/47112


Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 3274c2c1
No related merge requests found
......@@ -64,7 +64,7 @@ class TypoScriptToJsonConverter
* Convert TypoScript string to JSON
*
* @param array $typoscript TypoScript string containing all configuration for the form
* @return string The JSON for the form
* @return TYPO3\CMS\Form\Domain\Model\Json\FormJsonElement|false The JSON for the form
*/
public function convert(array $typoscript)
{
......
......@@ -81,7 +81,7 @@ class FormWizardElement extends AbstractFormElement
* Read and convert the content record to JSON
*
* @see \TYPO3\CMS\Form\Domain\Repository\ContentRepository::getRecordAsJson
* @return string The JSON object if record exists, FALSE if not
* @return TYPO3\CMS\Form\Domain\Model\Json\FormJsonElement|false The JSON object if record exists, FALSE if not
*/
protected function getRecordAsJson()
{
......@@ -143,7 +143,6 @@ class FormWizardElement extends AbstractFormElement
*/
protected function resultAddWizardSettingsJson(array $settings)
{
$this->getRecordAsJson();
$recordJson = $this->getRecordAsJson();
$settings['Configuration'] = $recordJson;
$settings['ajaxUrl'] = $this->getAjaxUrl();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment