You are here

function lightning_media_modules_installed in Lightning Media 8.4

Same name and namespace in other branches
  1. 8 lightning_media.module \lightning_media_modules_installed()
  2. 8.2 lightning_media.module \lightning_media_modules_installed()
  3. 8.3 lightning_media.module \lightning_media_modules_installed()

Implements hook_modules_installed().

1 call to lightning_media_modules_installed()
lightning_media_install in ./lightning_media.install
Implements hook_install().

File

./lightning_media.module, line 100
Core media asset support for Lightning.

Code

function lightning_media_modules_installed(array $modules) {

  // Don't do anything during config sync.
  if (Drupal::isConfigSyncing()) {
    return;
  }
  if (in_array('lightning_roles', $modules, TRUE)) {
    Drupal::service('lightning.content_roles')
      ->grantPermissions('creator', [
      'use text format rich_text',
    ]);
  }
}