You are here

function lightning_layout_user_role_presave in Lightning Layout 8

Implements hook_ENTITY_TYPE_presave().

File

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

Code

function lightning_layout_user_role_presave(RoleInterface $role) {
  if ($role
    ->isNew() && $role
    ->id() === 'layout_manager') {
    $node_types = NodeType::loadMultiple();
    array_walk($node_types, 'lightning_layout_node_type_insert');
  }
}