src/View/ActionHandler/AbstractPropertyVisibilityHandler.php
private function matchVisibilityOfPropertyInAnyPalette(
        Action $action,
        PropertyInterface $property,
        $invisible,
        EnvironmentInterface $environment
    ) {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();
        if (true === $invisible || 1 === \count($palettesDefinition->getPalettes())) {
            return $invisible;
        }

        $propertiesDefinition = $environment->getDataDefinition()->getPropertiesDefinition();
        $defaultPalette       = $palettesDefinition->findPalette();
        $defaultProperties    = $defaultPalette->getProperties();
        $intersectModel       = $this->getIntersectionModel($action, $environment);

        $invisibleProperty = $invisible;
        foreach ($defaultProperties as $defaultProperty) {
            if (!$propertiesDefinition->hasProperty($defaultProperty->getName())) {
                continue;
            }

            $paletteSelectorProperty = $propertiesDefinition->getProperty($defaultProperty->getName());
            if (null === $paletteSelectorProperty->getOptions()) {
                continue;
            }

            $invisibleProperty =
                $this->matchPaletteProperty($property, $intersectModel, $defaultProperty, $environment);

            if (true === $invisibleProperty) {
                continue;
            }

            break;
        }

        return $invisibleProperty;
    }
private function matchVisibilityOfPropertyInAnyPalette(
        Action $action,
        PropertyInterface $property,
        $invisible,
        EnvironmentInterface $environment
    ) {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();
        if (true === $invisible || 1 === \count($palettesDefinition->getPalettes())) {
            return $invisible;
        }

        $propertiesDefinition = $environment->getDataDefinition()->getPropertiesDefinition();
        $defaultPalette       = $palettesDefinition->findPalette();
        $defaultProperties    = $defaultPalette->getProperties();
        $intersectModel       = $this->getIntersectionModel($action, $environment);

        $invisibleProperty = $invisible;
        foreach ($defaultProperties as $defaultProperty) {
            if (!$propertiesDefinition->hasProperty($defaultProperty->getName())) {
                continue;
            }

            $paletteSelectorProperty = $propertiesDefinition->getProperty($defaultProperty->getName());
            if (null === $paletteSelectorProperty->getOptions()) {
                continue;
            }

            $invisibleProperty =
                $this->matchPaletteProperty($property, $intersectModel, $defaultProperty, $environment);

            if (true === $invisibleProperty) {
                continue;
            }

            break;
        }

        return $invisibleProperty;
    }
private function matchVisibilityOfPropertyInAnyPalette ( Action $ action , PropertyInterface $ property , $ invisible , EnvironmentInterface $ environment ) { $ palettesDefinition = $ environment -> getDataDefinition ( ) -> getPalettesDefinition ( ) ; if ( true === $ invisible || 1 === \ count ( $ palettesDefinition -> getPalettes ( ) ) ) { return $ invisible ; } $ propertiesDefinition = $ environment -> getDataDefinition ( ) -> getPropertiesDefinition ( ) ; $ defaultPalette = $ palettesDefinition -> findPalette ( ) ; $ defaultProperties = $ defaultPalette -> getProperties ( ) ; $ intersectModel = $ this -> getIntersectionModel ( $ action , $ environment ) ; $ invisibleProperty = $ invisible ; foreach ( $ defaultProperties as $ defaultProperty ) { if ( ! $ propertiesDefinition -> hasProperty ( $ defaultProperty -> getName ( ) ) ) { continue ; } $ paletteSelectorProperty = $ propertiesDefinition -> getProperty ( $ defaultProperty -> getName ( ) ) ; if ( null === $ paletteSelectorProperty -> getOptions ( ) ) { continue ; } $ invisibleProperty = $ this -> matchPaletteProperty ( $ property , $ intersectModel , $ defaultProperty , $ environment ) ; if ( true === $ invisibleProperty ) { continue ; } break ; } return $ invisibleProperty ; }
Match visibility of property in any palette.

@param Action               $action      The action.
@param PropertyInterface    $property    The property.
@param bool                 $invisible   The visibility.
@param EnvironmentInterface $environment The environment.

@return bool
Match visibility of property in any palette .