You are here

function lightning_api_modules_installed in Lightning API 8

Same name and namespace in other branches
  1. 8.2 lightning_api.module \lightning_api_modules_installed()

Implements hook_modules_installed().

File

./lightning_api.module, line 11

Code

function lightning_api_modules_installed(array $modules) {

  // Don't change config during a sync.
  if (\Drupal::isConfigSyncing()) {
    return;
  }
  if (in_array('lightning_dev', $modules, TRUE)) {
    \Drupal::configFactory()
      ->getEditable('lightning_api.settings')
      ->set('entity_json', TRUE)
      ->set('bundle_docs', TRUE)
      ->save();
  }
}