src/Contao/View/Contao2BackendView/ActionHandler/SelectHandler.php
private function collectIntersectModelProperties(CollectionInterface $collection, EnvironmentInterface $environment)
    {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();

        $properties = [];
        foreach ($collection->getIterator() as $model) {
            $palette = $palettesDefinition->findPalette($model);

            $modelProperties = $this->getVisibleAndEditAbleProperties($palette, $model);
            foreach ($modelProperties as $modelProperty) {
                if (!$properties[$modelProperty]) {
                    $properties[$modelProperty] = 0;
                }

                ++$properties[$modelProperty];
            }
        }

        return \array_filter(
            $properties,
            function ($count) use ($collection) {
                return $count === $collection->count();
            }
        );
    }
private function collectIntersectModelProperties(CollectionInterface $collection, EnvironmentInterface $environment)
    {
        $palettesDefinition = $environment->getDataDefinition()->getPalettesDefinition();

        $properties = [];
        foreach ($collection->getIterator() as $model) {
            $palette = $palettesDefinition->findPalette($model);

            $modelProperties = $this->getVisibleAndEditAbleProperties($palette, $model);
            foreach ($modelProperties as $modelProperty) {
                if (!$properties[$modelProperty]) {
                    $properties[$modelProperty] = 0;
                }

                ++$properties[$modelProperty];
            }
        }

        return \array_filter(
            $properties,
            function ($count) use ($collection) {
                return $count === $collection->count();
            }
        );
    }
private function collectIntersectModelProperties ( CollectionInterface $ collection , EnvironmentInterface $ environment ) { $ palettesDefinition = $ environment -> getDataDefinition ( ) -> getPalettesDefinition ( ) ; $ properties = [ ] ; foreach ( $ collection -> getIterator ( ) as $ model ) { $ palette = $ palettesDefinition -> findPalette ( $ model ) ; $ modelProperties = $ this -> getVisibleAndEditAbleProperties ( $ palette , $ model ) ; foreach ( $ modelProperties as $ modelProperty ) { if ( ! $ properties [ $ modelProperty ] ) { $ properties [ $ modelProperty ] = 0 ; } ++ $ properties [ $ modelProperty ] ; } } return \ array_filter ( $ properties , function ( $ count ) use ( $ collection ) { return $ count === $ collection -> count ( ) ; } ) ; }
Collecting intersect properties from the collection of models.

@param CollectionInterface  $collection  The collection of models.
@param EnvironmentInterface $environment The environment.

@return array
Collecting intersect properties from the collection of models .