Property | Type | Description | |
---|---|---|---|
$activePackages | array | List of active packages as package key => package object | |
$bootstrap | |||
$composerNameToPackageKeyMap | array | A map between ComposerName and PackageKey, only available when scanAvailablePackages is run | |
$dispatcher | |||
$packageFactory | |||
$packageKeys | array | A translation table between lower cased and upper camel cased package keys | |
$packageStatesConfiguration | array | Package states configuration as stored in the PackageStates.php file | |
$packageStatesPathAndFilename | string | ||
$packages | array | Array of available packages, indexed by package key (case sensitive) | |
$packagesBasePath | string | Absolute path leading to the various package directories | |
$settings | array |
Method | Description | |
---|---|---|
__construct ( string $packageStatesPathAndFilename = '' ) | ||
activatePackage ( string $packageKey ) : void | Activates a package | |
createPackage ( string $packageKey, array $manifest = [], string $packagesPath = null ) : Neos\Flow\Package\PackageInterface | Create a package, given the package key | |
deactivatePackage ( string $packageKey ) : void | Deactivates a package | |
deletePackage ( string $packageKey ) : void | Removes a package from registry and deletes it from filesystem | |
freezePackage ( string $packageKey ) : void | Freezes a package | |
getActivePackages ( ) : array | Returns an array of PackageInterface objects of all active packages. | |
getAvailablePackages ( ) : array |
Returns an array of PackageInterface objects of all available packages. | |
getCaseSensitivePackageKey ( string $unknownCasedPackageKey ) : mixed | Returns the correctly cased version of the given package key or FALSE if no such package is available. | |
getFilteredPackages ( string $packageState = 'available', string $packagePath = null, string $packageType = null ) : array |
Returns an array of PackageInterface objects of all packages that match the given package state, path, and type filters. All three filters must match, if given. | |
getFrozenPackages ( ) : array |
Returns an array of PackageInterface objects of all frozen packages. | |
getPackage ( string $packageKey ) : Neos\Flow\Package\PackageInterface | Returns a PackageInterface object for the specified package. | |
getPackageKeyFromComposerName ( string $composerName ) : string | Resolves a Flow package key from a composer package name. | |
getPackageVersion ( string $composerName ) : string | Get the package version of the given package Return normalized package version. | |
getPackagesBasePath ( ) : string | Returns the base path for packages | |
initialize ( |
Initializes the package manager | |
injectSettings ( array $settings ) : void | ||
isPackageActive ( string $packageKey ) : boolean | Returns TRUE if a package is activated or FALSE if it's not. | |
isPackageAvailable ( string $packageKey ) : boolean | Returns TRUE if a package is available (the package's files exist in the packages directory) or FALSE if it's not. If a package is available it doesn't mean necessarily that it's active! | |
isPackageFrozen ( string $packageKey ) : boolean | Tells if a package is frozen | |
isPackageKeyValid ( string $packageKey ) : boolean | Check the conformance of the given package key | |
refreezePackage ( string $packageKey ) : void | Refreezes a package | |
rescanPackages ( boolean $reloadPackageStates = true ) : array | Rescans available packages, order and write a new PackageStates file. | |
unfreezePackage ( string $packageKey ) : void | Unfreezes a package |
Method | Description | |
---|---|---|
buildActivePackageRelativePath ( string $inactivePackagePath ) : string | Build the relative path to store an active package from the given inactive path | |
buildInactivePackageRelativePath ( string $packagePath ) : string | Build the relative path to store a deactivated package based on the package. | |
collectPackageManifestData ( array $packageStates ) : array | Collects the manifest data for all packages in the given package states array | |
derivePackageKey ( string $composerName, string $packageType = null, string $packagePath = null, string $autoloadNamespace = null ) : string | Derive a flow package key from the given information. | |
emitPackageStatesUpdated ( ) : void | Emits a signal when package states have been changed (e.g. when a package was created or activated) | |
filterPackagesByPath ( array &$packages, string $filterPath ) : array |
Returns an array of PackageInterface objects in the given array of packages that are in the specified Package Path | |
filterPackagesByType ( array &$packages, string $packageType ) : array |
Returns an array of PackageInterface objects in the given array of packages that are of the specified package type. | |
findComposerPackagesInPath ( string $startingDirectory ) : Generator | Recursively traverses directories from the given starting points and returns all folder paths that contain a composer.json and which does NOT have the key "extra.neos.is-merged-repository" set, as that indicates a composer package that joins several "real" packages together. | |
getCurrentPackageStates ( ) : array | Loads the states of available packages from the PackageStates.php file and initialises a package scan if the file was not found or the configuration format was not current. | |
getPackageKeyFromManifest ( array $manifest, string $packagePath ) : string | Resolves package key from Composer manifest | |
loadPackageStates ( ) : array | Load the current package states | |
movePackage ( string $fromAbsolutePath, string $toAbsolutePath ) : void | Moves a package from one path to another. | |
movePackageToActivatedPackages ( string $inactivePackagePath ) : void | Moves a package from the given inactive package path to the active package path. | |
movePackageToDeactivatedPackages ( string $packagePath ) : void | Moves a package from the regular package path to the inactive packages directory. | |
preparePackageStateConfiguration ( string $packageKey, string $packagePath, array $composerManifest, string $state = self::PACKAGE_STATE_ACTIVE ) : array | ||
recoverStateFromConfiguration ( array $packageStatesConfiguration ) : array | Recover previous package state from given packageStatesConfiguration to be used after rescanning packages. | |
registerPackageFromStateConfiguration ( string $composerName, array $packageStateConfiguration ) : void | Registers a package under the given composer name with the configuration. | |
registerPackagesFromConfiguration ( array $packageStatesConfiguration ) | Requires and registers all packages which were defined in packageStatesConfiguration | |
savePackageStates ( array $orderedPackageStates ) | Save the given (ordered) array of package states data | |
scanAvailablePackages ( array $previousPackageStatesConfiguration ) : array | Scans all directories in the packages directories for available packages. | |
sortAndSavePackageStates ( array $packageStates ) : array | Takes the given packageStatesConfiguration, sorts it by dependencies, saves it and returns the ordered list | |
sortAvailablePackagesByDependencies ( array $packageStates ) : array | Orders all packages by comparing their dependencies. By this, the packages and package configurations arrays holds all packages in the correct initialization order. | |
unregisterPackage ( Neos\Flow\Package\PackageInterface $package ) : void | Unregisters a package from the list of available packages |
public __construct ( string $packageStatesPathAndFilename = '' ) | ||
$packageStatesPathAndFilename | string |
public activatePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to activate |
return | void |
protected buildActivePackageRelativePath ( string $inactivePackagePath ) : string | ||
$inactivePackagePath | string | |
return | string |
protected buildInactivePackageRelativePath ( string $packagePath ) : string | ||
$packagePath | string | absolute path to the package |
return | string |
protected collectPackageManifestData ( array $packageStates ) : array | ||
$packageStates | array | |
return | array |
public createPackage ( string $packageKey, array $manifest = [], string $packagesPath = null ) : Neos\Flow\Package\PackageInterface | ||
$packageKey | string | The package key of the new package |
$manifest | array | A composer manifest as associative array. This is a preparation for the signature change in Flow 4.0. If you use this argument, then $packageMetaData and $packageType will be ignored. |
$packagesPath | string | If specified, the package will be created in this path, otherwise the default "Application" directory is used |
return | Neos\Flow\Package\PackageInterface | The newly created package |
public deactivatePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to deactivate |
return | void |
public deletePackage ( string $packageKey ) : void | ||
$packageKey | string | package to remove |
return | void |
protected emitPackageStatesUpdated ( ) : void | ||
return | void |
protected filterPackagesByPath ( array &$packages, string $filterPath ) : array |
||
$packages | array | Array of PackageInterface to be filtered |
$filterPath | string | Filter out anything that's not in this path |
return | array |
protected filterPackagesByType ( array &$packages, string $packageType ) : array |
||
$packages | array | Array of PackageInterface objects to be filtered |
$packageType | string | Filter out anything that's not of this packageType |
return | array |
protected findComposerPackagesInPath ( string $startingDirectory ) : Generator | ||
$startingDirectory | string | |
return | Generator |
public freezePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to freeze |
return | void |
public getActivePackages ( ) : array | ||
return | array |
public getAvailablePackages ( ) : array |
||
return | array |
public getCaseSensitivePackageKey ( string $unknownCasedPackageKey ) : mixed | ||
$unknownCasedPackageKey | string | The package key to convert |
return | mixed | The upper camel cased package key or FALSE if no such package exists |
protected getCurrentPackageStates ( ) : array | ||
return | array |
public getFrozenPackages ( ) : array |
||
return | array |
public getPackage ( string $packageKey ) : Neos\Flow\Package\PackageInterface | ||
$packageKey | string | |
return | Neos\Flow\Package\PackageInterface | The requested package object |
public getPackageKeyFromComposerName ( string $composerName ) : string | ||
$composerName | string | |
return | string |
public static getPackageVersion ( string $composerName ) : string | ||
$composerName | string | |
return | string |
public getPackagesBasePath ( ) : string | ||
return | string |
public initialize ( |
||
$bootstrap | The current bootstrap | |
return | void |
public injectSettings ( array $settings ) : void | ||
$settings | array | |
return | void |
public isPackageActive ( string $packageKey ) : boolean | ||
$packageKey | string | The key of the package to check |
return | boolean | TRUE if package is active, otherwise FALSE |
public isPackageAvailable ( string $packageKey ) : boolean | ||
$packageKey | string | The key of the package to check |
return | boolean | TRUE if the package is available, otherwise FALSE |
public isPackageFrozen ( string $packageKey ) : boolean | ||
$packageKey | string | The package to check |
return | boolean |
public isPackageKeyValid ( string $packageKey ) : boolean | ||
$packageKey | string | The package key to validate |
return | boolean | If the package key is valid, returns TRUE otherwise FALSE |
protected loadPackageStates ( ) : array | ||
return | array |
protected movePackageToActivatedPackages ( string $inactivePackagePath ) : void | ||
$inactivePackagePath | string | |
return | void |
protected movePackageToDeactivatedPackages ( string $packagePath ) : void | ||
$packagePath | string | absolute path to the package |
return | void |
protected recoverStateFromConfiguration ( array $packageStatesConfiguration ) : array | ||
$packageStatesConfiguration | array | |
return | array |
public refreezePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to refreeze |
return | void |
protected registerPackagesFromConfiguration ( array $packageStatesConfiguration ) | ||
$packageStatesConfiguration | array |
public rescanPackages ( boolean $reloadPackageStates = true ) : array | ||
$reloadPackageStates | boolean | Should the package states be loaded before scanning or use the current configuration |
return | array | The found and sorted package states. |
protected savePackageStates ( array $orderedPackageStates ) | ||
$orderedPackageStates | array |
protected scanAvailablePackages ( array $previousPackageStatesConfiguration ) : array | ||
$previousPackageStatesConfiguration | array | Existing package state configuration |
return | array |
protected sortAndSavePackageStates ( array $packageStates ) : array | ||
$packageStates | array | |
return | array |
protected sortAvailablePackagesByDependencies ( array $packageStates ) : array | ||
$packageStates | array | The unordered package states |
return | array | ordered package states. |
public unfreezePackage ( string $packageKey ) : void | ||
$packageKey | string | The package to unfreeze |
return | void |
protected unregisterPackage ( Neos\Flow\Package\PackageInterface $package ) : void | ||
$package | Neos\Flow\Package\PackageInterface | The package to be unregistered |
return | void |
protected array $activePackages | ||
return | array |
protected Bootstrap,Neos\Flow\Core $bootstrap | ||
return |
protected array $composerNameToPackageKeyMap | ||
return | array |
protected Dispatcher,Neos\Flow\SignalSlot $dispatcher | ||
return |
protected PackageFactory,Neos\Flow\Package $packageFactory | ||
return |
protected array $packageKeys | ||
return | array |
protected array $packageStatesConfiguration | ||
return | array |
protected string $packageStatesPathAndFilename | ||
return | string |
protected array $packages | ||
return | array |
protected string $packagesBasePath | ||
return | string |