You are here

function lightning_media_modules_installed in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.4 lightning_media.module \lightning_media_modules_installed()
  2. 8 lightning_media.module \lightning_media_modules_installed()
  3. 8.2 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 167
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)) {
    \Drupal::service('lightning.content_roles')
      ->grantPermissions('creator', [
      'use text format rich_text',
      'access ckeditor_media_browser entity browser pages',
      'access media_browser entity browser pages',
    ]);
  }
}