src/View/ActionHandler/AbstractPropertyVisibilityHandler.php
private function makePropertyInvisibleByPalette(
        DataDefinition\Definition\Properties\PropertyInterface $property,
        EnvironmentInterface $environment
    ) {
        $palettes = $environment->getDataDefinition()->getPalettesDefinition();

        foreach ($palettes->getPalettes() as $palette) {
            foreach ($palette->getLegends() as $legend) {
                if (!$legend->hasProperty($property->getName())) {
                    continue;
                }

                $visibleCondition = new PropertyTrueCondition('dummyNotVisible');

                $invisibleProperty = $legend->getProperty($property->getName());
                $conditions        = $invisibleProperty->getVisibleCondition();

                $conditions->addCondition($visibleCondition);
            }
        }
    }
private function makePropertyInvisibleByPalette(
        DataDefinition\Definition\Properties\PropertyInterface $property,
        EnvironmentInterface $environment
    ) {
        $palettes = $environment->getDataDefinition()->getPalettesDefinition();

        foreach ($palettes->getPalettes() as $palette) {
            foreach ($palette->getLegends() as $legend) {
                if (!$legend->hasProperty($property->getName())) {
                    continue;
                }

                $visibleCondition = new PropertyTrueCondition('dummyNotVisible');

                $invisibleProperty = $legend->getProperty($property->getName());
                $conditions        = $invisibleProperty->getVisibleCondition();

                $conditions->addCondition($visibleCondition);
            }
        }
    }
private function makePropertyInvisibleByPalette ( DataDefinition \ Definition \ Properties \ PropertyInterface $ property , EnvironmentInterface $ environment ) { $ palettes = $ environment -> getDataDefinition ( ) -> getPalettesDefinition ( ) ; foreach ( $ palettes -> getPalettes ( ) as $ palette ) { foreach ( $ palette -> getLegends ( ) as $ legend ) { if ( ! $ legend -> hasProperty ( $ property -> getName ( ) ) ) { continue ; } $ visibleCondition = new PropertyTrueCondition ( 'dummyNotVisible' ) ; $ invisibleProperty = $ legend -> getProperty ( $ property -> getName ( ) ) ; $ conditions = $ invisibleProperty -> getVisibleCondition ( ) ; $ conditions -> addCondition ( $ visibleCondition ) ; } } }
Make the property invisible in all legends of each palette.

@param DataDefinition\Definition\Properties\PropertyInterface $property    The property.
@param EnvironmentInterface                                   $environment The environment.

@return void
Make the property invisible in all legends of each palette .