Returns if the provided siteaccess is running in legacy mode.

@param string $siteAccessName

@return bool
557581
protected function isLegacyModeSiteAccess($siteAccessName)
    {
        if (!$this->configResolver->hasParameter('legacy_mode', 'ezsettings', $siteAccessName)) {
            return false;
        }

        return $this->configResolver->getParameter('legacy_mode', 'ezsettings', $siteAccessName);
    }
97194
public function isDeprecatedProperty(string $propertyName) : bool
    {
        $deprecatedProperties = [
            'Win16' => 1,
            'Win32' => 1,
            'Win64' => 1,
            'isMobileDevice' => 1,
            'isTablet' => 1,
            'Crawler' => 1,
            'AolVersion' => 1,
            'MajorVer' => 1,
            'MinorVer' => 1,
        ];

        if (isset($deprecatedProperties[$propertyName])) {
            return true;
        }

        return false;
    }
576057
static function isCacheEnabled()
    {
        if ( isset( $GLOBALS['eZSiteBasics'] ) )
        {
            $siteBasics = $GLOBALS['eZSiteBasics'];
            if ( isset( $siteBasics['no-cache-adviced'] ) and
                 $siteBasics['no-cache-adviced'] )
            {
                return false;
            }
        }

        $ini = eZINI::instance();
        $cacheEnabled = $ini->variable( 'TemplateSettings', 'NodeTreeCaching' ) == 'enabled';
        return $cacheEnabled;
    }
176797
static function allDesignBases( $siteAccess = false )
    {
        // in memory caching
        if ( $siteAccess )
        {
            if ( isset( $GLOBALS['eZTemplateDesignResourceSiteAccessBases'] ) )
            {
                if ( isset( $GLOBALS['eZTemplateDesignResourceSiteAccessBases'][$siteAccess] ) )
                {
                    return $GLOBALS['eZTemplateDesignResourceSiteAccessBases'][$siteAccess];
                }
            }
            else
            {
                $GLOBALS['eZTemplateDesignResourceSiteAccessBases'] = array();
            }
        }
        else
        {
            if ( isset( $GLOBALS['eZTemplateDesignResourceBases'] ) )
            {
                return $GLOBALS['eZTemplateDesignResourceBases'];
            }
        }

        if ( eZINI::instance( 'site.ini' )->variable( 'DesignSettings', 'DesignLocationCache' ) === 'enabled' )
        {
            // Using current SA if none given
            $siteAccessName = $siteAccess !== false ? $siteAccess : $GLOBALS['eZCurrentAccess']['name'];

            $cachePath = eZSys::cacheDirectory()
                         . '/'
                         . self::DESIGN_BASE_CACHE_NAME
                         . md5( $siteAccessName )
                         . '.php';

            $clusterFileHandler = eZClusterFileHandler::instance( $cachePath );

            if( $clusterFileHandler->fileExists( $cachePath ) )
            {
                $designBaseList = unserialize( $clusterFileHandler->fetchContents() );

                self::savesMemoryCache( $designBaseList, $siteAccess );
            }
            else
            {
                // find design locations
                $designBaseList = self::findDesignBase( eZINI::instance( 'file.ini' ), $siteAccess );

                // stores it on the disk
                $clusterFileHandler->fileStoreContents( $cachePath,
                                                        serialize( $designBaseList ),
                                                        'designbases',
                                                        'php' );

                self::savesMemoryCache( $designBaseList, $siteAccess );
            }
        }
        else
        {
            // find design locations
            $designBaseList = self::findDesignBase( eZINI::instance( 'file.ini' ), $siteAccess );

            self::savesMemoryCache( $designBaseList, $siteAccess );
        }

        return $designBaseList;
    }
14792
public function setSiteAccess(SiteAccess $siteAccess = null)
    {
        if ($siteAccess === null) {
            return;
        }

        $this->matchConfig = $this->configResolver->getParameter('block_view', 'ezsettings', $siteAccess->name);
    }
353271
private static function find_theme_location($themename) {
        global $CFG;

        if (file_exists("$CFG->dirroot/theme/$themename/config.php")) {
            $dir = "$CFG->dirroot/theme/$themename";

        } else if (!empty($CFG->themedir) and file_exists("$CFG->themedir/$themename/config.php")) {
            $dir = "$CFG->themedir/$themename";

        } else {
            return null;
        }

        if (file_exists("$dir/styles.php")) {
            //legacy theme - needs to be upgraded - upgrade info is displayed on the admin settings page
            return null;
        }

        return $dir;
    }
888431
public function vote($siteAccess, array $routeConfig)
    {
        if ($siteAccess !== $this->defaultSiteAccess) {
            return VoterInterface::ABSTAIN;
        }

        if (in_array(static::DEFAULT_KEY, $routeConfig, true)) {
            return true;
        }

        return VoterInterface::ABSTAIN;
    }
852691
public function getSiteAccesses($mandatorId = null, $siteAccess = null)
    {
        if ($mandatorId) {
            $siteAccesses = $this->getSiteaccessesByMandatorId($mandatorId);
        } elseif ($siteAccess) {
            $siteAccesses = array($siteAccess);
        } else {
            $siteAccesses = array($this->siteAccess->name);
        }

        return $siteAccesses;
    }
405583
private function getMainLanguagesBySiteAccesses(array $siteAccesses)
    {
        $languages = array();

        foreach ($siteAccesses as $siteAccess) {
            $languageList = $this->configResolver->getParameter(
                'languages',
                '',
                $siteAccess !== 'default' ? $siteAccess : null
            );
            $mainLanguage = reset($languageList);

            if ($mainLanguage) {
                $languages[$mainLanguage] = $mainLanguage;
            }
        }

        return array_keys($languages);
    }
846663
public function isSatisfiedBy($item): bool
    {
        if (!$item instanceof SiteAccess) {
            throw new InvalidArgumentException($item, sprintf('Must be instance of %s', SiteAccess::class));
        }

        return in_array($item->name, $this->siteAccessGroups[EzPlatformAdminUiBundle::ADMIN_GROUP_NAME], true);
    }
77514
protected function checkCacheVersion()
    {
        $fileName = $this->getVersionFileName();

        if (!file_exists($fileName)) {
            return false;
        }

        $version = md5($this->boltVersion);
        $cached = file_get_contents($fileName);

        if ($version === $cached) {
            return true;
        }
        $this->versionChange = true;

        return false;
    }
1079497
public function checkUserHasSomeViewAccess()
    {
        if ($this->hasSuperUserAccess()) {
            return;
        }

        $idSitesAccessible = $this->getSitesIdWithAtLeastViewAccess();

        if (count($idSitesAccessible) == 0) {
            throw new NoAccessException(Piwik::translate('General_ExceptionPrivilegeAtLeastOneWebsite', array('view')));
        }
    }
745428
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;
    }
856469
public function isActiveSidebar($sidebarName)
    {
        if (!$sidebarOption = $this->findOneByOptionName('sidebars_widgets')) {
            return false;
        }

        if (false === ($sidebarOption = unserialize($sidebarOption->getValue()))) {
            return false;
        }

        return isset($sidebarOption[$sidebarName]);
    }
204187
public function getAccessLevelsForEvent($eventName)
    {
        if (!isset($this->items[$eventName])) {
            return false;
        }
        
        return $this->items[$eventName];
    }
387592
public function isSection()
    {
        return $this->isCurrent() || (
            Director::get_current_page() instanceof SiteTree && in_array($this->ID, Director::get_current_page()->getAncestors()->column())
        );
    }
467774
public function exists($themeName)
    {
        foreach ($this->themes as $theme) {
            if ($theme->name == $themeName) {
                return true;
            }

        }
        return false;
    }