src/View/ActionHandler/AbstractPropertyVisibilityHandler.php
private function matchInvisibleSubProperties(
        ModelInterface $model,
        DataDefinition\Definition\Properties\PropertyInterface $property,
        PropertyValueBagInterface $propertyValueBag,
        EnvironmentInterface $environment
    ) {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();

        $testPropertyValueBag = clone $propertyValueBag;
        $testPropertyValueBag->setPropertyValue('dummyNotVisible', true);

        $palette = $palettesDefinition->findPalette($model);

        $properties = [];
        foreach ($palette->getLegends() as $legend) {
            if (!$legend->hasProperty($property->getName())) {
                continue;
            }

            $legendProperties = (array) $legend->getProperties($model, $testPropertyValueBag);
            if (empty($legendProperties)) {
                continue;
            }

            foreach ($legendProperties as $legendProperty) {
                if ($property->getName() === $legendProperty->getName()) {
                    continue;
                }

                $conditions = $legendProperty->getVisibleCondition();

                if (!$conditions->match($model, $testPropertyValueBag, $legendProperty, $legend)) {
                    continue;
                }

                $this->matchParentInvisibleProperty($conditions, $property, $legendProperty, $properties, $environment);
            }
        }

        return $properties;
    }
private function matchInvisibleSubProperties(
        ModelInterface $model,
        DataDefinition\Definition\Properties\PropertyInterface $property,
        PropertyValueBagInterface $propertyValueBag,
        EnvironmentInterface $environment
    ) {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();

        $testPropertyValueBag = clone $propertyValueBag;
        $testPropertyValueBag->setPropertyValue('dummyNotVisible', true);

        $palette = $palettesDefinition->findPalette($model);

        $properties = [];
        foreach ($palette->getLegends() as $legend) {
            if (!$legend->hasProperty($property->getName())) {
                continue;
            }

            $legendProperties = (array) $legend->getProperties($model, $testPropertyValueBag);
            if (empty($legendProperties)) {
                continue;
            }

            foreach ($legendProperties as $legendProperty) {
                if ($property->getName() === $legendProperty->getName()) {
                    continue;
                }

                $conditions = $legendProperty->getVisibleCondition();

                if (!$conditions->match($model, $testPropertyValueBag, $legendProperty, $legend)) {
                    continue;
                }

                $this->matchParentInvisibleProperty($conditions, $property, $legendProperty, $properties, $environment);
            }
        }

        return $properties;
    }
private function matchInvisibleSubProperties ( ModelInterface $ model , DataDefinition \ Definition \ Properties \ PropertyInterface $ property , PropertyValueBagInterface $ propertyValueBag , EnvironmentInterface $ environment ) { $ palettesDefinition = $ environment -> getDataDefinition ( ) -> getPalettesDefinition ( ) ; $ testPropertyValueBag = clone $ propertyValueBag ; $ testPropertyValueBag -> setPropertyValue ( 'dummyNotVisible' , true ) ; $ palette = $ palettesDefinition -> findPalette ( $ model ) ; $ properties = [ ] ; foreach ( $ palette -> getLegends ( ) as $ legend ) { if ( ! $ legend -> hasProperty ( $ property -> getName ( ) ) ) { continue ; } $ legendProperties = ( array ) $ legend -> getProperties ( $ model , $ testPropertyValueBag ) ; if ( empty ( $ legendProperties ) ) { continue ; } foreach ( $ legendProperties as $ legendProperty ) { if ( $ property -> getName ( ) === $ legendProperty -> getName ( ) ) { continue ; } $ conditions = $ legendProperty -> getVisibleCondition ( ) ; if ( ! $ conditions -> match ( $ model , $ testPropertyValueBag , $ legendProperty , $ legend ) ) { continue ; } $ this -> matchParentInvisibleProperty ( $ conditions , $ property , $ legendProperty , $ properties , $ environment ) ; } } return $ properties ; }
Match invisible sub properties.

@param ModelInterface                                         $model            The model.
@param DataDefinition\Definition\Properties\PropertyInterface $property         The property.
@param PropertyValueBagInterface                              $propertyValueBag The property values.
@param EnvironmentInterface                                   $environment      The environment.

@return array
Match invisible sub properties .