src/View/ActionHandler/AbstractPropertyOverrideEditAllHandler.php
private function handleEditHandler(
        Action $action,
        ModelInterface $model,
        PropertyValueBagInterface $propertyValueBag,
        EnvironmentInterface $environment
    ) {
        $inputProvider   = $environment->getInputProvider();
        $editInformation = $GLOBALS['container']['dc-general.edit-information'];

        $inputValues = $this->handleInputValues($action, $model, $environment);

        $view = $environment->getView();
        if (!$view instanceof BaseView) {
            return;
        }

        $clone = clone $model;
        $clone->setId($model->getId());

        $inputProvider->setParameter('id', ModelId::fromModel($model)->getSerialized());

        $this->callAction($environment, 'edit');

        $inputProvider->unsetParameter('id');

        $this->restoreInputValues($action, $model, $propertyValueBag, $inputValues, $environment);

        $errorInformation = $editInformation->getModelError($model);
        if (null !== $errorInformation) {
            foreach (\array_keys($errorInformation) as $errorPropertyName) {
                if (false === $propertyValueBag->hasPropertyValue($errorPropertyName)) {
                    continue;
                }

                if ($propertyValueBag->isPropertyValueInvalid($errorPropertyName)) {
                    continue;
                }

                foreach ($errorInformation[$errorPropertyName] as $error) {
                    $propertyValueBag->markPropertyValueAsInvalid($errorPropertyName, $error);
                }
            }
        }
    }
private function handleEditHandler(
        Action $action,
        ModelInterface $model,
        PropertyValueBagInterface $propertyValueBag,
        EnvironmentInterface $environment
    ) {
        $inputProvider   = $environment->getInputProvider();
        $editInformation = $GLOBALS['container']['dc-general.edit-information'];

        $inputValues = $this->handleInputValues($action, $model, $environment);

        $view = $environment->getView();
        if (!$view instanceof BaseView) {
            return;
        }

        $clone = clone $model;
        $clone->setId($model->getId());

        $inputProvider->setParameter('id', ModelId::fromModel($model)->getSerialized());

        $this->callAction($environment, 'edit');

        $inputProvider->unsetParameter('id');

        $this->restoreInputValues($action, $model, $propertyValueBag, $inputValues, $environment);

        $errorInformation = $editInformation->getModelError($model);
        if (null !== $errorInformation) {
            foreach (\array_keys($errorInformation) as $errorPropertyName) {
                if (false === $propertyValueBag->hasPropertyValue($errorPropertyName)) {
                    continue;
                }

                if ($propertyValueBag->isPropertyValueInvalid($errorPropertyName)) {
                    continue;
                }

                foreach ($errorInformation[$errorPropertyName] as $error) {
                    $propertyValueBag->markPropertyValueAsInvalid($errorPropertyName, $error);
                }
            }
        }
    }
private function handleEditHandler ( Action $ action , ModelInterface $ model , PropertyValueBagInterface $ propertyValueBag , EnvironmentInterface $ environment ) { $ inputProvider = $ environment -> getInputProvider ( ) ; $ editInformation = $ GLOBALS [ 'container' ] [ 'dc-general.edit-information' ] ; $ inputValues = $ this -> handleInputValues ( $ action , $ model , $ environment ) ; $ view = $ environment -> getView ( ) ; if ( ! $ view instanceof BaseView ) { return ; } $ clone = clone $ model ; $ clone -> setId ( $ model -> getId ( ) ) ; $ inputProvider -> setParameter ( 'id' , ModelId :: fromModel ( $ model ) -> getSerialized ( ) ) ; $ this -> callAction ( $ environment , 'edit' ) ; $ inputProvider -> unsetParameter ( 'id' ) ; $ this -> restoreInputValues ( $ action , $ model , $ propertyValueBag , $ inputValues , $ environment ) ; $ errorInformation = $ editInformation -> getModelError ( $ model ) ; if ( null !== $ errorInformation ) { foreach ( \ array_keys ( $ errorInformation ) as $ errorPropertyName ) { if ( false === $ propertyValueBag -> hasPropertyValue ( $ errorPropertyName ) ) { continue ; } if ( $ propertyValueBag -> isPropertyValueInvalid ( $ errorPropertyName ) ) { continue ; } foreach ( $ errorInformation [ $ errorPropertyName ] as $ error ) { $ propertyValueBag -> markPropertyValueAsInvalid ( $ errorPropertyName , $ error ) ; } } } }
Handle the edit handler.

@param Action                    $action           The action.
@param ModelInterface            $model            The model.
@param PropertyValueBagInterface $propertyValueBag The property value.
@param EnvironmentInterface      $environment      The environment.

@return void

@SuppressWarnings(PHPMD.Superglobals)
Handle the edit handler .