Neos\Neos\Setup\Step\SiteImportStep::deactivateOtherSitePackages PHP 메소드

deactivateOtherSitePackages() 보호된 메소드

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 deactivateOtherSitePackages ( string $packageKey ) : array
$packageKey string
리턴 array
    protected function deactivateOtherSitePackages($packageKey)
    {
        $sitePackagesToDeactivate = $this->packageManager->getFilteredPackages('active', null, 'neos-site');
        $deactivatedSitePackages = array();
        foreach ($sitePackagesToDeactivate as $sitePackageToDeactivate) {
            if ($sitePackageToDeactivate->getPackageKey() !== $packageKey) {
                $this->packageManager->deactivatePackage($sitePackageToDeactivate->getPackageKey());
                $deactivatedSitePackages[] = $sitePackageToDeactivate->getPackageKey();
            }
        }
        if (count($deactivatedSitePackages) >= 1) {
            $this->flashMessageContainer->addMessage(new Message(sprintf('The existing Site Packages "%s" were deactivated, in order to prevent interactions with the newly created package "%s".', implode(', ', $deactivatedSitePackages), $packageKey)));
        }
    }