You are here

function lightning_workflow_install in Lightning Workflow 8.3

Same name and namespace in other branches
  1. 8 lightning_workflow.install \lightning_workflow_install()
  2. 8.2 lightning_workflow.install \lightning_workflow_install()

Implements hook_install().

File

./lightning_workflow.install, line 13
Contains installation and update routines for Lightning Workflow.

Code

function lightning_workflow_install() {

  // Stop here during a config sync.
  if (Drupal::isConfigSyncing()) {
    return;
  }
  $modules = [
    'autosave_form',
    'lightning_roles',
  ];
  $modules = array_filter($modules, [
    Drupal::moduleHandler(),
    'moduleExists',
  ]);
  if ($modules) {
    lightning_workflow_modules_installed($modules);
  }
  foreach (NodeType::loadMultiple() as $node_type) {
    lightning_workflow_node_type_insert($node_type);
  }
}