Package implements PackageInterface
A Package representing the details of an extension and/or a composer package
Table of Contents
Interfaces
- PackageInterface
- Interface for a TYPO3 Package class
Properties
- $composerManifest : stdClass
- $isRelativePackagePath : bool
- $packageKey : string
- Unique key of this package.
- $packageMetaData : MetaData
- Meta information about this package
- $packagePath : string
- Full path to this package's main directory
- $partOfFactoryDefault : bool
- If this package is part of factory default, it will be activated during first installation.
- $partOfMinimalUsableSystem : bool
- If this package is part of minimal usable system, it will be activated if PackageStates is created from scratch.
- $protected : bool
- If this package is protected and therefore cannot be deactivated or deleted
- $serviceProvider : string|null
- ServiceProvider class name. This property and the corresponding composer.json setting is internal and therefore no api (yet).
Methods
- __construct() : mixed
- Constructor
- getPackageKey() : string
- Returns the package key of this package.
- getPackageMetaData() : MetaData
- Returns the package meta data object of this package.
- getPackagePath() : string
- Returns the full path to this package's main directory
- getPackageReplacementKeys() : array<string|int, mixed>
- Returns an array of packages this package replaces
- getServiceProvider() : string
- Get the Service Provider class name
- getValueFromComposerManifest() : mixed|null
- Returns contents of Composer manifest - or part there of if a key is given.
- isPartOfFactoryDefault() : bool
- Tells if the package is part of the default factory configuration and therefor activated at first installation.
- isPartOfMinimalUsableSystem() : bool
- Tells if the package is required for a minimal usable (backend) system and therefor activated if PackageStates is created from scratch for whatever reason.
- isProtected() : bool
- Tells if this package is protected and therefore cannot be deactivated or deleted
- makePathRelative() : void
- Used by PackageArtifactBuilder to make package path relative
- setProtected() : mixed
- Sets the protection flag of the package
- createPackageMetaData() : mixed
- Creates the package meta data object of this package.
- loadFlagsFromComposerManifest() : mixed
- Loads package management related flags from the "extra:typo3/cms:Package" section of extensions composer.json files into local properties
Properties
$composerManifest
protected
stdClass
$composerManifest
$isRelativePackagePath
protected
bool
$isRelativePackagePath
= false
$packageKey
Unique key of this package.
protected
string
$packageKey
$packageMetaData
Meta information about this package
protected
MetaData
$packageMetaData
$packagePath
Full path to this package's main directory
protected
string
$packagePath
$partOfFactoryDefault
If this package is part of factory default, it will be activated during first installation.
protected
bool
$partOfFactoryDefault
= false
$partOfMinimalUsableSystem
If this package is part of minimal usable system, it will be activated if PackageStates is created from scratch.
protected
bool
$partOfMinimalUsableSystem
= false
$protected
If this package is protected and therefore cannot be deactivated or deleted
protected
bool
$protected
= false
$serviceProvider
ServiceProvider class name. This property and the corresponding composer.json setting is internal and therefore no api (yet).
protected
string|null
$serviceProvider
Methods
__construct()
Constructor
public
__construct(PackageManager $packageManager, string $packageKey, string $packagePath[, bool $ignoreExtEmConf = false ]) : mixed
Parameters
- $packageManager : PackageManager
-
the package manager which knows this package
- $packageKey : string
-
Key of this package
- $packagePath : string
-
Absolute path to the location of the package's composer manifest
- $ignoreExtEmConf : bool = false
-
When set ext_emconf.php is ignored when building composer manifest
Tags
getPackageKey()
Returns the package key of this package.
public
getPackageKey() : string
Return values
stringgetPackageMetaData()
Returns the package meta data object of this package.
public
getPackageMetaData() : MetaData
Return values
MetaDatagetPackagePath()
Returns the full path to this package's main directory
public
getPackagePath() : string
Return values
string —Path to this package's main directory
getPackageReplacementKeys()
Returns an array of packages this package replaces
public
getPackageReplacementKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>getServiceProvider()
Get the Service Provider class name
public
getServiceProvider() : string
Return values
stringgetValueFromComposerManifest()
Returns contents of Composer manifest - or part there of if a key is given.
public
getValueFromComposerManifest([string $key = null ]) : mixed|null
Parameters
- $key : string = null
-
Optional. Only return the part of the manifest indexed by 'key'
Tags
Return values
mixed|nullisPartOfFactoryDefault()
Tells if the package is part of the default factory configuration and therefor activated at first installation.
public
isPartOfFactoryDefault() : bool
Return values
boolisPartOfMinimalUsableSystem()
Tells if the package is required for a minimal usable (backend) system and therefor activated if PackageStates is created from scratch for whatever reason.
public
isPartOfMinimalUsableSystem() : bool
Return values
boolisProtected()
Tells if this package is protected and therefore cannot be deactivated or deleted
public
isProtected() : bool
Return values
boolmakePathRelative()
Used by PackageArtifactBuilder to make package path relative
public
makePathRelative(Filesystem $filesystem, string $composerRootPath) : void
Parameters
- $filesystem : Filesystem
- $composerRootPath : string
setProtected()
Sets the protection flag of the package
public
setProtected(bool $protected) : mixed
Parameters
- $protected : bool
-
TRUE if the package should be protected, otherwise FALSE
createPackageMetaData()
Creates the package meta data object of this package.
protected
createPackageMetaData(PackageManager $packageManager) : mixed
Parameters
- $packageManager : PackageManager
loadFlagsFromComposerManifest()
Loads package management related flags from the "extra:typo3/cms:Package" section of extensions composer.json files into local properties
protected
loadFlagsFromComposerManifest() : mixed