protected static function Updater::getExtensionInfo in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getExtensionInfo()
- 9 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getExtensionInfo()
Get Extension information from directory.
Parameters
string $directory: Directory to search in.
Return value
array Extension info.
Throws
\Drupal\Core\Updater\UpdaterException If the info parser does not provide any info.
File
- core/
lib/ Drupal/ Core/ Updater/ Updater.php, line 141
Class
- Updater
- Defines the base class for Updaters used in Drupal.
Namespace
Drupal\Core\UpdaterCode
protected static function getExtensionInfo($directory) {
$info_file = static::findInfoFile($directory);
$info = \Drupal::service('info_parser')
->parse($info_file);
if (empty($info)) {
throw new UpdaterException("Unable to parse info file: '{$info_file}'.");
}
return $info;
}