You are here

function lightning_layout_modules_installed in Lightning Layout 8

Same name and namespace in other branches
  1. 8.2 lightning_layout.module \lightning_layout_modules_installed()

Implements hook_modules_installed().

1 call to lightning_layout_modules_installed()
lightning_layout_install in ./lightning_layout.install
Implements hook_install().

File

./lightning_layout.module, line 26
Contains layout functionality for Lightning.

Code

function lightning_layout_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', [
      'access panels in-place editing',
      'change layouts in place editing',
      'administer panelizer node ? content',
      'administer panelizer node ? layout',
    ]);
  }
}