Neos\Neos\Controller\Module\Administration\SitesController::deactivateAllOtherSitePackages PHP 메소드

deactivateAllOtherSitePackages() 보호된 메소드

If site packages already exist and are active, we will deactivate them in order to prevent interactions with the newly created or imported package (like Content Dimensions being used).
protected deactivateAllOtherSitePackages ( string $activePackageKey ) : array
$activePackageKey string Package key of one package which should stay active
리턴 array deactivated site packages
    protected function deactivateAllOtherSitePackages($activePackageKey)
    {
        $sitePackagesToDeactivate = $this->packageManager->getFilteredPackages('active', null, 'neos-site');
        $deactivatedSitePackages = array();
        foreach (array_keys($sitePackagesToDeactivate) as $packageKey) {
            if ($packageKey !== $activePackageKey) {
                $this->packageManager->deactivatePackage($packageKey);
                $deactivatedSitePackages[] = $packageKey;
            }
        }
        return $deactivatedSitePackages;
    }