src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/EditAllHandler.php
private function markModelErrors(
        Action $action,
        ModelInterface $model,
        ModelInterface $editModel,
        PropertyInterface $editProperty,
        PropertyInterface $selectProperty,
        PropertyValueBagInterface $propertyValuesBag,
        EnvironmentInterface $environment
    ) {
        $editInformation = $GLOBALS['container']['dc-general.edit-information'];
        $sessionValues   = $this->getEditPropertiesByModelId($action, ModelId::fromModel($model), $environment);

        $modelError = $editInformation->getModelError($editModel);
        if ($modelError && isset($modelError[$selectProperty->getName()])) {
            $propertyValuesBag->setPropertyValue(
                $editProperty->getName(),
                $sessionValues[$selectProperty->getName()]
            );

            $propertyValuesBag->setPropertyValue(
                $selectProperty->getName(),
                $sessionValues[$selectProperty->getName()]
            );

            $propertyValuesBag->markPropertyValueAsInvalid(
                $editProperty->getName(),
                $modelError[$selectProperty->getName()]
            );
        }
    }
private function markModelErrors(
        Action $action,
        ModelInterface $model,
        ModelInterface $editModel,
        PropertyInterface $editProperty,
        PropertyInterface $selectProperty,
        PropertyValueBagInterface $propertyValuesBag,
        EnvironmentInterface $environment
    ) {
        $editInformation = $GLOBALS['container']['dc-general.edit-information'];
        $sessionValues   = $this->getEditPropertiesByModelId($action, ModelId::fromModel($model), $environment);

        $modelError = $editInformation->getModelError($editModel);
        if ($modelError && isset($modelError[$selectProperty->getName()])) {
            $propertyValuesBag->setPropertyValue(
                $editProperty->getName(),
                $sessionValues[$selectProperty->getName()]
            );

            $propertyValuesBag->setPropertyValue(
                $selectProperty->getName(),
                $sessionValues[$selectProperty->getName()]
            );

            $propertyValuesBag->markPropertyValueAsInvalid(
                $editProperty->getName(),
                $modelError[$selectProperty->getName()]
            );
        }
    }
private function markModelErrors ( Action $ action , ModelInterface $ model , ModelInterface $ editModel , PropertyInterface $ editProperty , PropertyInterface $ selectProperty , PropertyValueBagInterface $ propertyValuesBag , EnvironmentInterface $ environment ) { $ editInformation = $ GLOBALS [ 'container' ] [ 'dc-general.edit-information' ] ; $ sessionValues = $ this -> getEditPropertiesByModelId ( $ action , ModelId :: fromModel ( $ model ) , $ environment ) ; $ modelError = $ editInformation -> getModelError ( $ editModel ) ; if ( $ modelError && isset ( $ modelError [ $ selectProperty -> getName ( ) ] ) ) { $ propertyValuesBag -> setPropertyValue ( $ editProperty -> getName ( ) , $ sessionValues [ $ selectProperty -> getName ( ) ] ) ; $ propertyValuesBag -> setPropertyValue ( $ selectProperty -> getName ( ) , $ sessionValues [ $ selectProperty -> getName ( ) ] ) ; $ propertyValuesBag -> markPropertyValueAsInvalid ( $ editProperty -> getName ( ) , $ modelError [ $ selectProperty -> getName ( ) ] ) ; } }
Mark model errors.

@param Action                    $action            The action.
@param ModelInterface            $model             The model.
@param ModelInterface            $editModel         The edit model.
@param PropertyInterface         $editProperty      The edit property.
@param PropertyInterface         $selectProperty    The select property.
@param PropertyValueBagInterface $propertyValuesBag The properties values.
@param EnvironmentInterface      $environment       The environment.

@return void

@SuppressWarnings(PHPMD.Superglobals)
Mark model errors .