You are here

lightning_roles.install in Lightning Core 8

File

modules/lightning_roles/lightning_roles.install
View source
<?php

use Drupal\node\Entity\NodeType;

/**
 * Implements hook_install().
 */
function lightning_roles_install() {

  // Don't do anything during a config sync.
  if (\Drupal::isConfigSyncing()) {
    return;
  }

  // Create content roles for all existing node types.
  $node_types = NodeType::loadMultiple();
  array_walk($node_types, 'lightning_roles_node_type_insert');
}

Functions

Namesort descending Description
lightning_roles_install Implements hook_install().