src/View/ActionHandler/AbstractPropertyOverrideEditAllHandler.php
private function updatePropertyValueBag(
        Action $action,
        ModelInterface $model,
        PropertyValueBagInterface $sourcePropertyValueBag,
        PropertyValueBagInterface $updatePropertyValueBag,
        EnvironmentInterface $environment
    ) {
        $dataProvider      = $environment->getDataProvider();
        $sessionProperties = $this->getPropertiesFromSession($action, $environment);

        foreach (\array_keys($sessionProperties) as $sessionPropertyName) {
            if (!$sourcePropertyValueBag->hasPropertyValue($sessionPropertyName)) {
                continue;
            }

            if (!$updatePropertyValueBag->isPropertyValueInvalid($sessionPropertyName)) {
                $editModel = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($model->getId()));
                $updatePropertyValueBag->setPropertyValue(
                    $sessionPropertyName,
                    $editModel->getProperty($sessionPropertyName)
                );
            }

            if ($updatePropertyValueBag->isPropertyValueInvalid($sessionPropertyName)) {
                continue;
            }

            $updatePropertyValueBag->markPropertyValueAsInvalid(
                $sessionPropertyName,
                $sourcePropertyValueBag->getPropertyValueErrors(
                    $sessionPropertyName
                )
            );
        }
    }
private function updatePropertyValueBag(
        Action $action,
        ModelInterface $model,
        PropertyValueBagInterface $sourcePropertyValueBag,
        PropertyValueBagInterface $updatePropertyValueBag,
        EnvironmentInterface $environment
    ) {
        $dataProvider      = $environment->getDataProvider();
        $sessionProperties = $this->getPropertiesFromSession($action, $environment);

        foreach (\array_keys($sessionProperties) as $sessionPropertyName) {
            if (!$sourcePropertyValueBag->hasPropertyValue($sessionPropertyName)) {
                continue;
            }

            if (!$updatePropertyValueBag->isPropertyValueInvalid($sessionPropertyName)) {
                $editModel = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($model->getId()));
                $updatePropertyValueBag->setPropertyValue(
                    $sessionPropertyName,
                    $editModel->getProperty($sessionPropertyName)
                );
            }

            if ($updatePropertyValueBag->isPropertyValueInvalid($sessionPropertyName)) {
                continue;
            }

            $updatePropertyValueBag->markPropertyValueAsInvalid(
                $sessionPropertyName,
                $sourcePropertyValueBag->getPropertyValueErrors(
                    $sessionPropertyName
                )
            );
        }
    }
private function updatePropertyValueBag ( Action $ action , ModelInterface $ model , PropertyValueBagInterface $ sourcePropertyValueBag , PropertyValueBagInterface $ updatePropertyValueBag , EnvironmentInterface $ environment ) { $ dataProvider = $ environment -> getDataProvider ( ) ; $ sessionProperties = $ this -> getPropertiesFromSession ( $ action , $ environment ) ; foreach ( \ array_keys ( $ sessionProperties ) as $ sessionPropertyName ) { if ( ! $ sourcePropertyValueBag -> hasPropertyValue ( $ sessionPropertyName ) ) { continue ; } if ( ! $ updatePropertyValueBag -> isPropertyValueInvalid ( $ sessionPropertyName ) ) { $ editModel = $ dataProvider -> fetch ( $ dataProvider -> getEmptyConfig ( ) -> setId ( $ model -> getId ( ) ) ) ; $ updatePropertyValueBag -> setPropertyValue ( $ sessionPropertyName , $ editModel -> getProperty ( $ sessionPropertyName ) ) ; } if ( $ updatePropertyValueBag -> isPropertyValueInvalid ( $ sessionPropertyName ) ) { continue ; } $ updatePropertyValueBag -> markPropertyValueAsInvalid ( $ sessionPropertyName , $ sourcePropertyValueBag -> getPropertyValueErrors ( $ sessionPropertyName ) ) ; } }
Update property value bag.

@param Action                    $action                 The action.
@param ModelInterface            $model                  The model.
@param PropertyValueBagInterface $sourcePropertyValueBag The source property value bag.
@param PropertyValueBagInterface $updatePropertyValueBag The update property value bag.
@param EnvironmentInterface      $environment            The environment.

@return void
Update property value bag .