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

        $clonePropertyValueBag = clone $propertyValueBag;
        foreach (\array_keys($propertyValueBag->getArrayCopy()) as $propertyName) {
            $clonePropertyValueBag->resetPropertyValueErrors($propertyName);

            if ($this->ensurePropertyVisibleInModel($action, $propertyName, $model, $environment)) {
                if (!\array_key_exists($propertyName, $sessionProperties)
                ) {
                    $clonePropertyValueBag->setPropertyValue($propertyName, $model->getProperty($propertyName));
                }

                continue;
            }

            $clonePropertyValueBag->removePropertyValue($propertyName);
        }

        return $clonePropertyValueBag;
    }
private function cloneCleanPropertyValueBag(
        Action $action,
        PropertyValueBagInterface $propertyValueBag,
        ModelInterface $model,
        EnvironmentInterface $environment
    ) {
        $sessionProperties = $this->getPropertiesFromSession($action, $environment);

        $clonePropertyValueBag = clone $propertyValueBag;
        foreach (\array_keys($propertyValueBag->getArrayCopy()) as $propertyName) {
            $clonePropertyValueBag->resetPropertyValueErrors($propertyName);

            if ($this->ensurePropertyVisibleInModel($action, $propertyName, $model, $environment)) {
                if (!\array_key_exists($propertyName, $sessionProperties)
                ) {
                    $clonePropertyValueBag->setPropertyValue($propertyName, $model->getProperty($propertyName));
                }

                continue;
            }

            $clonePropertyValueBag->removePropertyValue($propertyName);
        }

        return $clonePropertyValueBag;
    }
private function cloneCleanPropertyValueBag ( Action $ action , PropertyValueBagInterface $ propertyValueBag , ModelInterface $ model , EnvironmentInterface $ environment ) { $ sessionProperties = $ this -> getPropertiesFromSession ( $ action , $ environment ) ; $ clonePropertyValueBag = clone $ propertyValueBag ; foreach ( \ array_keys ( $ propertyValueBag -> getArrayCopy ( ) ) as $ propertyName ) { $ clonePropertyValueBag -> resetPropertyValueErrors ( $ propertyName ) ; if ( $ this -> ensurePropertyVisibleInModel ( $ action , $ propertyName , $ model , $ environment ) ) { if ( ! \ array_key_exists ( $ propertyName , $ sessionProperties ) ) { $ clonePropertyValueBag -> setPropertyValue ( $ propertyName , $ model -> getProperty ( $ propertyName ) ) ; } continue ; } $ clonePropertyValueBag -> removePropertyValue ( $ propertyName ) ; } return $ clonePropertyValueBag ; }
Clone and clean property value bag.

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

@return PropertyValueBagInterface
Clone and clean property value bag .