Last active
December 16, 2015 09:49
-
-
Save smichaelsen/5416046 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyVendor\EventCenter\ViewHelpers\Form; | |
class TextfieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\TextfieldViewHelper { | |
/** | |
* Get errors for the property and form name of this view helper | |
* | |
* @return \TYPO3\CMS\Extbase\Error\Result | |
*/ | |
protected function getMappingResultsForProperty() { | |
$originalRequestMappingResults = $this->controllerContext->getRequest()->getOriginalRequestMappingResults(); | |
if ($this->isObjectAccessorMode()) { | |
$formObjectName = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObjectName'); | |
return $originalRequestMappingResults->forProperty($formObjectName)->forProperty($this->arguments['property']); | |
} else { | |
return $originalRequestMappingResults->forProperty($this->arguments['name']); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment