‪TYPO3CMS  ‪main
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, string $packageKey, string $packagePath, bool $ignoreExtEmConf=false)
 
 getServiceProvider ()
 
 isPartOfFactoryDefault ()
 
 isPartOfMinimalUsableSystem ()
 
 getPackageKey ()
 
 isProtected ()
 
 setProtected (bool $protected)
 
string getPackagePath ()
 
 makePathRelative (Filesystem $filesystem, string $composerRootPath)
 
 getPackageMetaData ()
 
 getPackageReplacementKeys ()
 
 getValueFromComposerManifest ($key=null)
 
 getPackageIcon ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Package\PackageInterface
 getValueFromComposerManifest (string $key=null)
 

Protected Member Functions

 loadFlagsFromComposerManifest ()
 
 createPackageMetaData (PackageManager $packageManager)
 

Protected Attributes

bool $partOfFactoryDefault = false
 
bool $partOfMinimalUsableSystem = false
 
string $serviceProvider
 
string $packageKey
 
string $packagePath
 
bool $isRelativePackagePath = false
 
bool $protected = false
 
stdClass $composerManifest
 
MetaData $packageMetaData
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Package\PackageInterface
const PATTERN_MATCH_COMPOSER_NAME = '{^[a-z0-9_.-]+/[a-z0-9_.-]+$}D'
 
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 29 of file Package.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Package\Package::__construct ( PackageManager  $packageManager,
string  $packageKey,
string  $packagePath,
bool  $ignoreExtEmConf = false 
)
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
bool$ignoreExtEmConf‪When set ext_emconf.php is ignored when building composer manifest
Exceptions
Exception

Definition at line 84 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.

Definition at line 121 of file Package.php.

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

◆ getPackageIcon()

TYPO3\CMS\Core\Package\Package::getPackageIcon ( )

Find package icon location relative to the package path

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 269 of file Package.php.

◆ getPackageKey()

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

Returns the package key of this package.

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 176 of file Package.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\setTitleFromExtEmConf().

◆ getPackageMetaData()

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

Returns the package meta data object of this package.

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 230 of file Package.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\setTitleFromExtEmConf().

◆ 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 204 of file Package.php.

Referenced by TYPO3\CMS\Core\Composer\PackageArtifactBuilder\setTitleFromExtEmConf().

◆ getPackageReplacementKeys()

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

Returns an array of packages this package replaces

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 239 of file Package.php.

◆ getServiceProvider()

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

Get the Service Provider class name

Definition at line 152 of file Package.php.

◆ getValueFromComposerManifest()

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'
See also
‪json_decode for return values

Definition at line 252 of file Package.php.

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

◆ isPartOfFactoryDefault()

TYPO3\CMS\Core\Package\Package::isPartOfFactoryDefault ( )

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 160 of file Package.php.

◆ isPartOfMinimalUsableSystem()

TYPO3\CMS\Core\Package\Package::isPartOfMinimalUsableSystem ( )

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 168 of file Package.php.

◆ isProtected()

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

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

Implements TYPO3\CMS\Core\Package\PackageInterface.

Definition at line 184 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 106 of file Package.php.

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

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

◆ makePathRelative()

TYPO3\CMS\Core\Package\Package::makePathRelative ( Filesystem  $filesystem,
string  $composerRootPath 
)

Used by PackageArtifactBuilder to make package path relative

Definition at line 219 of file Package.php.

◆ setProtected()

TYPO3\CMS\Core\Package\Package::setProtected ( bool  $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 194 of file Package.php.

Member Data Documentation

◆ $composerManifest

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

Definition at line 68 of file Package.php.

◆ $isRelativePackagePath

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

Definition at line 61 of file Package.php.

◆ $packageKey

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

Unique key of this package.

Definition at line 54 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 73 of file Package.php.

◆ $packagePath

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

Full path to this package's main directory

Definition at line 59 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 35 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 41 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 49 of file Package.php.