You are here

private function ModulesInstalled::getExtensionsInfo in Open Social 8.9

Same name and namespace in other branches
  1. 8.5 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  2. 8.6 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  3. 8.7 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  4. 8.8 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  5. 10.3.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  6. 10.0.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  7. 10.1.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()
  8. 10.2.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getExtensionsInfo()

Get safe extensions info.

Parameters

\Drupal\Core\Extension\Extension[] $projects: An array of extensions.

Return value

array Returns an array of projects with safe values.

1 call to ModulesInstalled::getExtensionsInfo()
ModulesInstalled::getValue in modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php
Get the value.

File

modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php, line 53

Class

ModulesInstalled
Provides a 'ModulesInstalled' share usage data plugin.

Namespace

Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin

Code

private function getExtensionsInfo(array $projects) {
  $value = [];
  uasort($projects, 'system_sort_modules_by_info_name');

  /** @var \Drupal\Core\Extension\Extension $project */
  foreach ($projects as $project) {
    $name = $project
      ->getName();
    $info = $project->info;
    unset($info['dependencies']);
    $value[$name] = [
      'type' => $project
        ->getType(),
      'name' => $name,
      'status' => $project->status,
      'origin' => $project->origin,
      'info' => $info,
    ];
  }
  return $value;
}