public function elementValue(FormRuntime $formRuntime, RootRenderableInterface $element)
    {
        $request = $formRuntime->getRequest();
        /** @var Result $validationResults */
        $validationResults = $formRuntime->getRequest()->getInternalArgument('__submittedArgumentValidationResults');
        if ($validationResults !== null && $validationResults->forProperty($element->getIdentifier())->hasErrors()) {
            return $this->getLastSubmittedFormData($request, $element->getIdentifier());
        }
        return ObjectAccess::getPropertyPath($formRuntime, $element->getIdentifier());
    }
public function elementValue(FormRuntime $formRuntime, RootRenderableInterface $element)
    {
        $request = $formRuntime->getRequest();
        /** @var Result $validationResults */
        $validationResults = $formRuntime->getRequest()->getInternalArgument('__submittedArgumentValidationResults');
        if ($validationResults !== null && $validationResults->forProperty($element->getIdentifier())->hasErrors()) {
            return $this->getLastSubmittedFormData($request, $element->getIdentifier());
        }
        return ObjectAccess::getPropertyPath($formRuntime, $element->getIdentifier());
    }
public function elementValue ( FormRuntime $ formRuntime , RootRenderableInterface $ element ) { $ request = $ formRuntime -> getRequest ( ) ; /** @var Result $validationResults */ $ validationResults = $ formRuntime -> getRequest ( ) -> getInternalArgument ( '__submittedArgumentValidationResults' ) ; if ( $ validationResults !== null && $ validationResults -> forProperty ( $ element -> getIdentifier ( ) ) -> hasErrors ( ) ) { return $ this -> getLastSubmittedFormData ( $ request , $ element -> getIdentifier ( ) ) ; } return ObjectAccess :: getPropertyPath ( $ formRuntime , $ element -> getIdentifier ( ) ) ; }
Returns the value of a given Form Element.
If there are validation errors for the element, the previously submitted value will be returned.

@param FormRuntime $formRuntime The current FormRuntime instance
@param RootRenderableInterface $element The element to fetch the value for
@return mixed|null
Returns the value of a given Form Element . If there are validation errors for the element the previously submitted value will be returned .