‪TYPO3CMS  10.4
TYPO3\CMS\Core\Package\Package Class Reference
Inheritance diagram for TYPO3\CMS\Core\Package\Package:
TYPO3\CMS\Core\Package\PackageInterface

Public Member Functions

 __construct (PackageManager $packageManager, $packageKey, $packagePath)
 
string getServiceProvider ()
 
bool isPartOfFactoryDefault ()
 
bool isPartOfMinimalUsableSystem ()
 
string getPackageKey ()
 
bool isProtected ()
 
 setProtected ($protected)
 
string getPackagePath ()
 
MetaData getPackageMetaData ()
 
array getPackageReplacementKeys ()
 
mixed null getValueFromComposerManifest ($key=null)
 

Protected Member Functions

 loadFlagsFromComposerManifest ()
 
 createPackageMetaData (PackageManager $packageManager)
 

Protected Attributes

array $extensionManagerConfiguration = array( )
 
bool $partOfFactoryDefault = false
 
bool $partOfMinimalUsableSystem = false
 
string $serviceProvider
 
string $packageKey
 
string $packagePath
 
bool $protected = false
 
stdClass $composerManifest
 
MetaData $packageMetaData
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Package\PackageInterface
const PATTERN_MATCH_PACKAGEKEY = '/^[a-z0-9]+\.(?:[a-z0-9][\.a-z0-9]*)+$/i'
 
const PATTERN_MATCH_EXTENSIONKEY = '/^[0-9a-z_-]+$/i'
 

Detailed Description

A Package representing the details of an extension and/or a composer package

Definition at line 25 of file Package.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Package\Package::__construct ( PackageManager  $packageManager,
  $packageKey,
  $packagePath 
)

Constructor

Parameters
PackageManager$packageManager‪the package manager which knows this package
string$packageKey‪Key of this package
string$packagePath‪Absolute path to the location of the package's composer manifest
Exceptions
Exception

Definition at line 87 of file Package.php.

References TYPO3\CMS\Core\Package\Package\$packageKey, TYPO3\CMS\Core\Package\Package\$packagePath, TYPO3\CMS\Core\Package\Package\createPackageMetaData(), and TYPO3\CMS\Core\Package\Package\loadFlagsFromComposerManifest().

Member Function Documentation

◆ createPackageMetaData()

TYPO3\CMS\Core\Package\Package::createPackageMetaData ( PackageManager  $packageManager)
protected

Creates the package meta data object of this package.

Parameters
PackageManager$packageManager

Definition at line 126 of file Package.php.

Referenced by TYPO3\CMS\Core\Package\Package\__construct().

◆ getPackageKey()

string TYPO3\CMS\Core\Package\Package::getPackageKey ( )

Returns the package key of this package.

Returns
‪string

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 189 of file Package.php.

◆ getPackageMetaData()

MetaData TYPO3\CMS\Core\Package\Package::getPackageMetaData ( )

Returns the package meta data object of this package.

Returns
MetaData

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 230 of file Package.php.

◆ getPackagePath()

string TYPO3\CMS\Core\Package\Package::getPackagePath ( )

Returns the full path to this package's main directory

Returns
‪string Path to this package's main directory

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 219 of file Package.php.

◆ getPackageReplacementKeys()

array TYPO3\CMS\Core\Package\Package::getPackageReplacementKeys ( )

Returns an array of packages this package replaces

Returns
‪array

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 241 of file Package.php.

◆ getServiceProvider()

string TYPO3\CMS\Core\Package\Package::getServiceProvider ( )

Get the Service Provider class name

Returns
‪string

Definition at line 161 of file Package.php.

◆ getValueFromComposerManifest()

mixed null TYPO3\CMS\Core\Package\Package::getValueFromComposerManifest (   $key = null)

Returns contents of Composer manifest - or part there of if a key is given.

Parameters
string$key‪Optional. Only return the part of the manifest indexed by 'key'
Returns
‪mixed|null
See also
‪json_decode for return values

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 255 of file Package.php.

Referenced by TYPO3\CMS\Core\Package\Package\loadFlagsFromComposerManifest().

◆ isPartOfFactoryDefault()

bool TYPO3\CMS\Core\Package\Package::isPartOfFactoryDefault ( )
Returns
‪bool

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 170 of file Package.php.

◆ isPartOfMinimalUsableSystem()

bool TYPO3\CMS\Core\Package\Package::isPartOfMinimalUsableSystem ( )
Returns
‪bool

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 179 of file Package.php.

◆ isProtected()

bool TYPO3\CMS\Core\Package\Package::isProtected ( )

Tells if this package is protected and therefore cannot be deactivated or deleted

Returns
‪bool

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 199 of file Package.php.

◆ loadFlagsFromComposerManifest()

TYPO3\CMS\Core\Package\Package::loadFlagsFromComposerManifest ( )
protected

Loads package management related flags from the "extra:typo3/cms:Package" section of extensions composer.json files into local properties

Definition at line 109 of file Package.php.

References TYPO3\CMS\Core\Package\Package\getValueFromComposerManifest().

Referenced by TYPO3\CMS\Core\Package\Package\__construct().

◆ setProtected()

TYPO3\CMS\Core\Package\Package::setProtected (   $protected)

Sets the protection flag of the package

Parameters
bool$protected‪TRUE if the package should be protected, otherwise FALSE

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 209 of file Package.php.

Member Data Documentation

◆ $composerManifest

stdClass TYPO3\CMS\Core\Package\Package::$composerManifest
protected

Definition at line 70 of file Package.php.

◆ $extensionManagerConfiguration

array TYPO3\CMS\Core\Package\Package::$extensionManagerConfiguration = array( )
protected

Definition at line 29 of file Package.php.

◆ $packageKey

string TYPO3\CMS\Core\Package\Package::$packageKey
protected

Unique key of this package.

Definition at line 56 of file Package.php.

Referenced by TYPO3\CMS\Core\Package\Package\__construct().

◆ $packageMetaData

MetaData TYPO3\CMS\Core\Package\Package::$packageMetaData
protected

Meta information about this package

Definition at line 75 of file Package.php.

◆ $packagePath

string TYPO3\CMS\Core\Package\Package::$packagePath
protected

Full path to this package's main directory

Definition at line 61 of file Package.php.

Referenced by TYPO3\CMS\Core\Package\Package\__construct().

◆ $partOfFactoryDefault

bool TYPO3\CMS\Core\Package\Package::$partOfFactoryDefault = false
protected

If this package is part of factory default, it will be activated during first installation.

Definition at line 36 of file Package.php.

◆ $partOfMinimalUsableSystem

bool TYPO3\CMS\Core\Package\Package::$partOfMinimalUsableSystem = false
protected

If this package is part of minimal usable system, it will be activated if PackageStates is created from scratch.

Definition at line 43 of file Package.php.

◆ $protected

bool TYPO3\CMS\Core\Package\Package::$protected = false
protected

If this package is protected and therefore cannot be deactivated or deleted

Definition at line 66 of file Package.php.

◆ $serviceProvider

string TYPO3\CMS\Core\Package\Package::$serviceProvider
protected

ServiceProvider class name. This property and the corresponding composer.json setting is internal and therefore no api (yet).

Definition at line 51 of file Package.php.