src/View/ActionHandler/AbstractPropertyVisibilityHandler.php
protected function getIntersectionModel(Action $action, EnvironmentInterface $environment)
    {
        $inputProvider        = $environment->getInputProvider();
        $dataProvider         = $environment->getDataProvider();
        $dataDefinition       = $environment->getDataDefinition();
        $propertiesDefinition = $dataDefinition->getPropertiesDefinition();
        $session              = $this->getSession($action, $environment);

        $intersectModel = $dataProvider->getEmptyModel();

        $defaultPalette      = null;
        $legendPropertyNames = $this->getLegendPropertyNames($intersectModel, $environment, $defaultPalette);

        $idProperty = \method_exists($dataProvider, 'getIdProperty') ? $dataProvider->getIdProperty() : 'id';
        foreach ((array) $session['intersectValues'] as $intersectProperty => $intersectValue) {
            if (($idProperty === $intersectProperty)
                || !$propertiesDefinition->hasProperty($intersectProperty)
                || (false === $this->useIntersectValue(
                    $intersectProperty,
                    $legendPropertyNames,
                    $environment,
                    $defaultPalette
                ))
            ) {
                continue;
            }

            if ($inputProvider->hasValue($intersectProperty)) {
                $intersectModel->setProperty($intersectProperty, $inputProvider->getValue($intersectProperty));

                continue;
            }

            $intersectModel->setProperty($intersectProperty, $intersectValue);
        }

        $this->intersectModelSetPrimaryId($action, $intersectModel, $idProperty, $environment);
        $this->intersectModelSetParentId($intersectModel, $environment);

        return $intersectModel;
    }
protected function getIntersectionModel(Action $action, EnvironmentInterface $environment)
    {
        $inputProvider        = $environment->getInputProvider();
        $dataProvider         = $environment->getDataProvider();
        $dataDefinition       = $environment->getDataDefinition();
        $propertiesDefinition = $dataDefinition->getPropertiesDefinition();
        $session              = $this->getSession($action, $environment);

        $intersectModel = $dataProvider->getEmptyModel();

        $defaultPalette      = null;
        $legendPropertyNames = $this->getLegendPropertyNames($intersectModel, $environment, $defaultPalette);

        $idProperty = \method_exists($dataProvider, 'getIdProperty') ? $dataProvider->getIdProperty() : 'id';
        foreach ((array) $session['intersectValues'] as $intersectProperty => $intersectValue) {
            if (($idProperty === $intersectProperty)
                || !$propertiesDefinition->hasProperty($intersectProperty)
                || (false === $this->useIntersectValue(
                    $intersectProperty,
                    $legendPropertyNames,
                    $environment,
                    $defaultPalette
                ))
            ) {
                continue;
            }

            if ($inputProvider->hasValue($intersectProperty)) {
                $intersectModel->setProperty($intersectProperty, $inputProvider->getValue($intersectProperty));

                continue;
            }

            $intersectModel->setProperty($intersectProperty, $intersectValue);
        }

        $this->intersectModelSetPrimaryId($action, $intersectModel, $idProperty, $environment);
        $this->intersectModelSetParentId($intersectModel, $environment);

        return $intersectModel;
    }
protected function getIntersectionModel ( Action $ action , EnvironmentInterface $ environment ) { $ inputProvider = $ environment -> getInputProvider ( ) ; $ dataProvider = $ environment -> getDataProvider ( ) ; $ dataDefinition = $ environment -> getDataDefinition ( ) ; $ propertiesDefinition = $ dataDefinition -> getPropertiesDefinition ( ) ; $ session = $ this -> getSession ( $ action , $ environment ) ; $ intersectModel = $ dataProvider -> getEmptyModel ( ) ; $ defaultPalette = null ; $ legendPropertyNames = $ this -> getLegendPropertyNames ( $ intersectModel , $ environment , $ defaultPalette ) ; $ idProperty = \ method_exists ( $ dataProvider , 'getIdProperty' ) ? $ dataProvider -> getIdProperty ( ) : 'id' ; foreach ( ( array ) $ session [ 'intersectValues' ] as $ intersectProperty => $ intersectValue ) { if ( ( $ idProperty === $ intersectProperty ) || ! $ propertiesDefinition -> hasProperty ( $ intersectProperty ) || ( false === $ this -> useIntersectValue ( $ intersectProperty , $ legendPropertyNames , $ environment , $ defaultPalette ) ) ) { continue ; } if ( $ inputProvider -> hasValue ( $ intersectProperty ) ) { $ intersectModel -> setProperty ( $ intersectProperty , $ inputProvider -> getValue ( $ intersectProperty ) ) ; continue ; } $ intersectModel -> setProperty ( $ intersectProperty , $ intersectValue ) ; } $ this -> intersectModelSetPrimaryId ( $ action , $ intersectModel , $ idProperty , $ environment ) ; $ this -> intersectModelSetParentId ( $ intersectModel , $ environment ) ; return $ intersectModel ; }
Get the intersection Model.
If all select models has the same value by their property, then is the value set it.

@param Action               $action      The action.
@param EnvironmentInterface $environment The environment.

@return ModelInterface
Get the intersection Model . If all select models has the same value by their property then is the value set it .