protected function getImageVariationsForSiteaccess($siteaccess)
    {
        $variations = [];
        $imageAliasesList = $this->getGroup('AliasSettings', 'image.ini', $siteaccess);
        foreach ($imageAliasesList['AliasList'] as $imageAliasIdentifier) {
            $variationSettings = ['reference' => null, 'filters' => []];
            $aliasSettings = $this->getGroup($imageAliasIdentifier, 'image.ini', $siteaccess);
            if (isset($aliasSettings['Reference']) && $aliasSettings['Reference'] != '') {
                $variationSettings['reference'] = $aliasSettings['Reference'];
            }
            if (isset($aliasSettings['Filters']) && \is_array($aliasSettings['Filters'])) {
                // parse filters. Format: filtername=param1;param2...paramN
                foreach ($aliasSettings['Filters'] as $filterString) {
                    $filteringSettings = [];

                    if (strstr($filterString, '=') !== false) {
                        list($filteringSettings['name'], $filterParams) = explode('=', $filterString);
                        $filterParams = explode(';', $filterParams);

                        // make sure integers are actually integers, not strings
                        array_walk(
                            $filterParams,
                            static function (&$value) {
                                if (preg_match('/^[0-9]+$/', $value)) {
                                    $value = (int)$value;
                                }
                            }
                        );

                        $filteringSettings['params'] = $filterParams;
                    } else {
                        $filteringSettings['name'] = $filterString;
                    }

                    $variationSettings['filters'][] = $filteringSettings;
                }
            }
            $variations[$imageAliasIdentifier] = $variationSettings;
        }

        return $variations;
    }
protected function getImageVariationsForSiteaccess($siteaccess)
    {
        $variations = [];
        $imageAliasesList = $this->getGroup('AliasSettings', 'image.ini', $siteaccess);
        foreach ($imageAliasesList['AliasList'] as $imageAliasIdentifier) {
            $variationSettings = ['reference' => null, 'filters' => []];
            $aliasSettings = $this->getGroup($imageAliasIdentifier, 'image.ini', $siteaccess);
            if (isset($aliasSettings['Reference']) && $aliasSettings['Reference'] != '') {
                $variationSettings['reference'] = $aliasSettings['Reference'];
            }
            if (isset($aliasSettings['Filters']) && \is_array($aliasSettings['Filters'])) {
                // parse filters. Format: filtername=param1;param2...paramN
                foreach ($aliasSettings['Filters'] as $filterString) {
                    $filteringSettings = [];

                    if (strstr($filterString, '=') !== false) {
                        list($filteringSettings['name'], $filterParams) = explode('=', $filterString);
                        $filterParams = explode(';', $filterParams);

                        // make sure integers are actually integers, not strings
                        array_walk(
                            $filterParams,
                            static function (&$value) {
                                if (preg_match('/^[0-9]+$/', $value)) {
                                    $value = (int)$value;
                                }
                            }
                        );

                        $filteringSettings['params'] = $filterParams;
                    } else {
                        $filteringSettings['name'] = $filterString;
                    }

                    $variationSettings['filters'][] = $filteringSettings;
                }
            }
            $variations[$imageAliasIdentifier] = $variationSettings;
        }

        return $variations;
    }
protected function getImageVariationsForSiteaccess ( $ siteaccess ) { $ variations = [ ] ; $ imageAliasesList = $ this -> getGroup ( 'AliasSettings' , 'image.ini' , $ siteaccess ) ; foreach ( $ imageAliasesList [ 'AliasList' ] as $ imageAliasIdentifier ) { $ variationSettings = [ 'reference' => null , 'filters' => [ ] ] ; $ aliasSettings = $ this -> getGroup ( $ imageAliasIdentifier , 'image.ini' , $ siteaccess ) ; if ( isset ( $ aliasSettings [ 'Reference' ] ) && $ aliasSettings [ 'Reference' ] != '' ) { $ variationSettings [ 'reference' ] = $ aliasSettings [ 'Reference' ] ; } if ( isset ( $ aliasSettings [ 'Filters' ] ) && \ is_array ( $ aliasSettings [ 'Filters' ] ) ) { // parse filters. Format: filtername=param1;param2...paramN foreach ( $ aliasSettings [ 'Filters' ] as $ filterString ) { $ filteringSettings = [ ] ; if ( strstr ( $ filterString , '=' ) !== false ) { list ( $ filteringSettings [ 'name' ] , $ filterParams ) = explode ( '=' , $ filterString ) ; $ filterParams = explode ( ';' , $ filterParams ) ; // make sure integers are actually integers, not strings array_walk ( $ filterParams , static function ( & $ value ) { if ( preg_match ( '/^[0-9]+$/' , $ value ) ) { $ value = ( int ) $ value ; } } ) ; $ filteringSettings [ 'params' ] = $ filterParams ; } else { $ filteringSettings [ 'name' ] = $ filterString ; } $ variationSettings [ 'filters' ] [ ] = $ filteringSettings ; } } $ variations [ $ imageAliasIdentifier ] = $ variationSettings ; } return $ variations ; }
Returns the image variation settings for the siteaccess.

@param string $siteaccess

@return array
Returns the image variation settings for the siteaccess .