OpenSocialVersion.php in Open Social 8.6
Same filename and directory in other branches
- 8.9 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 8.5 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 8.7 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 8.8 modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 10.3.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 10.0.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 10.1.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
- 10.2.x modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.php
File
modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPlugin/OpenSocialVersion.phpView source
<?php
namespace Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPlugin;
use Drupal\social_lets_connect_usage\Plugin\ShareUsageDataPluginBase;
/**
* Provides a 'OpenSocialVersion' share usage data plugin.
*
* @ShareUsageDataPlugin(
* id = "open_social_version",
* label = @Translation("Open Social version"),
* setting = "open_social_version",
* weight = -450,
* )
*/
class OpenSocialVersion extends ShareUsageDataPluginBase {
/**
* Get the value.
*
* @return array
* $json array.
*/
public function getValue() {
$version = 0;
$profile = \Drupal::installProfile();
if ($profile === 'social') {
$info = system_get_info('module', $profile);
$version = $info['version'];
}
return [
'version' => $version,
];
}
}
Classes
Name | Description |
---|---|
OpenSocialVersion | Provides a 'OpenSocialVersion' share usage data plugin. |