You are here

public function ShareUsageDataPluginBase::enabled in Open Social 10.1.x

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

Check if this plugin should be enabled.

Overrides ShareUsageDataPluginInterface::enabled

File

modules/custom/social_lets_connect/modules/social_lets_connect_usage/src/Plugin/ShareUsageDataPluginBase.php, line 92

Class

ShareUsageDataPluginBase
Base class for Share usage data plugin plugins.

Namespace

Drupal\social_lets_connect_usage\Plugin

Code

public function enabled() {
  $config = $this->config
    ->get('social_lets_connect_usage.settings');
  $usage_data_settings = $config
    ->get('usage_data');
  $plugin_definition = $this
    ->getPluginDefinition();
  if (in_array($plugin_definition['setting'], $usage_data_settings)) {
    return TRUE;
  }
  return FALSE;
}