function ExtensionList::createExtensionInfo
Same name in other branches
- 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::createExtensionInfo()
- 8.9.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::createExtensionInfo()
- 11.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::createExtensionInfo()
Creates the info value for an extension object.
Parameters
\Drupal\Core\Extension\Extension $extension: The extension whose info is to be altered.
Return value
array The extension info array.
2 calls to ExtensionList::createExtensionInfo()
- ExtensionList::doList in core/
lib/ Drupal/ Core/ Extension/ ExtensionList.php - Builds the list of extensions.
- ThemeExtensionList::createExtensionInfo in core/
lib/ Drupal/ Core/ Extension/ ThemeExtensionList.php - Creates the info value for an extension object.
2 methods override ExtensionList::createExtensionInfo()
- DatabaseDriverList::createExtensionInfo in core/
lib/ Drupal/ Core/ Extension/ DatabaseDriverList.php - Creates the info value for an extension object.
- ThemeExtensionList::createExtensionInfo in core/
lib/ Drupal/ Core/ Extension/ ThemeExtensionList.php - Creates the info value for an extension object.
File
-
core/
lib/ Drupal/ Core/ Extension/ ExtensionList.php, line 550
Class
- ExtensionList
- Provides available extensions.
Namespace
Drupal\Core\ExtensionCode
protected function createExtensionInfo(Extension $extension) {
$info = $this->infoParser
->parse($extension->getPathname());
// Add the info file modification time, so it becomes available for
// contributed extensions to use for ordering extension lists.
$info['mtime'] = $extension->getFileInfo()
->getMTime();
// Merge extension type-specific defaults, making sure to replace NULL
// values.
foreach ($this->defaults as $key => $default_value) {
if (!isset($info[$key])) {
$info[$key] = $default_value;
}
}
return $info;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.