public function FeaturesManager::getPackages in Features 8.3
Same name and namespace in other branches
- 8.4 src/FeaturesManager.php \Drupal\features\FeaturesManager::getPackages()
Gets an array of packages.
Return value
\Drupal\features\Package[] An array of items, each with the following keys:
- 'machine_name': machine name of the package such as 'example_article'. 'article'.
- 'name': human readable name of the package such as 'Example Article'.
- 'description': description of the package.
- 'type': type of Drupal project ('module').
- 'coreVersionRequirement': Drupal core compatibility ('^8.9 | ^9').
- 'dependencies': array of module dependencies.
- 'themes': array of names of themes to install.
- 'config': array of names of configuration items.
- 'status': status of the package. Valid values are:
- 'version': version of the extension.
- 'state': state of the extension. Valid values are:
- 'directory': the extension's directory.
- 'files' array of files, each having the following keys:
- 'filename': the name of the file.
- 'subdirectory': any subdirectory of the file within the extension directory.
- 'string': the contents of the file.
- 'bundle': name of the features bundle this package belongs to.
- 'extension': \Drupal\Core\Extension\Extension object.
- 'info': the original info array from an existing package.
- 'configInfo': the original config of the module.
Overrides FeaturesManagerInterface::getPackages
See also
\Drupal\features\FeaturesManagerInterface::setPackages()
3 calls to FeaturesManager::getPackages()
- FeaturesManager::assignPackageDependencies in src/
FeaturesManager.php - Assigns dependencies from config items into the package.
- FeaturesManager::listPackageDirectories in src/
FeaturesManager.php - Lists directories in which packages are present.
- FeaturesManager::setPackageBundleNames in src/
FeaturesManager.php - Adds the optional bundle prefix to package machine names.
File
- src/
FeaturesManager.php, line 264
Class
- FeaturesManager
- The FeaturesManager provides helper functions for building packages.
Namespace
Drupal\featuresCode
public function getPackages() {
return $this->packages;
}