You are here

function bynder_update_8009 in Bynder 8.2

Same name and namespace in other branches
  1. 8.3 bynder.install \bynder_update_8009()
  2. 4.0.x bynder.install \bynder_update_8009()

Enables the bynder_usage submodule.

File

./bynder.install, line 192
Install, uninstall and update hooks for Bynder module.

Code

function bynder_update_8009() {

  /** @var \Drupal\Core\Extension\ModuleExtensionList $module_list */
  $module_list = \Drupal::service('extension.list.module');
  if ($module_list
    ->exists('entity_usage')) {
    \Drupal::service('module_installer')
      ->install([
      'bynder_usage',
    ]);
  }
  if (!$module_list
    ->exists('dropzonejs') || !$module_list
    ->exists('entity_usage')) {
    return t('Dropzonejs and Entity Usage are now optional dependencies and no longer required. Explicitly require these dependencies to keep upload and usage functionality available: composer require drupal/dropzonejs drupal/entity_usage:1.*');
  }
}