You are here

protected function ExtensionList::createExtensionInfo in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::createExtensionInfo()
  2. 9 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.

1 method overrides ExtensionList::createExtensionInfo()
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 553

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

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
    ->getMTime();

  // Merge extension type-specific defaults.
  $info += $this->defaults;
  return $info;
}