You are here

protected function SubscriptionTypeManager::findDefinitions in Commerce Recurring Framework 8

Finds plugin definitions.

Return value

array List of definitions to store in cache.

Overrides DefaultPluginManager::findDefinitions

File

src/SubscriptionTypeManager.php, line 54

Class

SubscriptionTypeManager
Manages discovery and instantiation of subscription type plugins.

Namespace

Drupal\commerce_recurring

Code

protected function findDefinitions() {
  $definitions = parent::findDefinitions();

  // The module ships a subscription type dependent on commerce_product
  // but doesn't depend on commerce_product.
  if (!$this->moduleHandler
    ->moduleExists('commerce_product')) {
    unset($definitions['product_variation']);
  }
  return $definitions;
}