lightning_workflow-8.x-3.x-dev/lightning_workflow.install
lightning_workflow.install
<?php
/**
* @file
* Contains installation and update routines for Lightning Workflow.
*/
use Drupal\node\Entity\NodeType;
/**
* Implements hook_install().
*/
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);
}
}
/**
* Implements hook_update_last_removed().
*/
function lightning_workflow_update_last_removed(): int {
return 8006;
}
