Neos\Flow\Package\PackageManager::registerPackageFromStateConfiguration PHP Method

registerPackageFromStateConfiguration() protected method

This uses the PackageFactory to create the Package instance and sets it to all relevant data arrays.
protected registerPackageFromStateConfiguration ( string $composerName, array $packageStateConfiguration ) : void
$composerName string
$packageStateConfiguration array
return void
    protected function registerPackageFromStateConfiguration($composerName, $packageStateConfiguration)
    {
        $packagePath = isset($packageStateConfiguration['packagePath']) ? $packageStateConfiguration['packagePath'] : null;
        $packageClassInformation = isset($packageStateConfiguration['packageClassInformation']) ? $packageStateConfiguration['packageClassInformation'] : null;
        $package = $this->packageFactory->create($this->packagesBasePath, $packagePath, $packageStateConfiguration['packageKey'], $composerName, $packageStateConfiguration['autoloadConfiguration'], $packageClassInformation);
        $this->packageKeys[strtolower($package->getPackageKey())] = $package->getPackageKey();
        $this->packages[$package->getPackageKey()] = $package;
        if (isset($this->activePackages[$package->getPackageKey()])) {
            unset($this->activePackages[$package->getPackageKey()]);
        }
        if (isset($packageStateConfiguration['state']) && $packageStateConfiguration['state'] === self::PACKAGE_STATE_ACTIVE || $package->isProtected()) {
            $this->activePackages[$package->getPackageKey()] = $package;
        }
    }