public function ModulesInstalled::getValue in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/ModulesInstalled.php \Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin\ModulesInstalled::getValue()
- 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::getValue()
- 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::getValue()
- 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::getValue()
- 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::getValue()
- 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::getValue()
- 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::getValue()
- 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::getValue()
Get the value.
Return value
array $json array.
Overrides ShareUsageDataPluginBase::getValue
File
- modules/
custom/ social_lets_connect/ modules/ social_lets_connect_usage/ src/ Plugin/ ShareUsageDataPlugin/ ModulesInstalled.php, line 25
Class
- ModulesInstalled
- Provides a 'ModulesInstalled' share usage data plugin.
Namespace
Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPluginCode
public function getValue() {
$value = [];
$modules = \Drupal::service('extension.list.module')
->reset()
->getList();
$modules = $this
->getExtensionsInfo($modules);
$theme_data = \Drupal::service('theme_handler')
->rebuildThemeData();
$themes = $this
->getExtensionsInfo($theme_data);
$profiles = \Drupal::service('extension.list.profile')
->reset()
->getList();
$profiles = $this
->getExtensionsInfo($profiles);
$value['modules'] = $modules;
$value['profiles'] = $profiles;
$value['themes'] = [
'themes' => $themes,
'default' => \Drupal::service('theme_handler')
->getDefault(),
];
return $value;
}