You are here

function shortcutperrole_user_role_delete in Shortcut per Role 8

Implements hook_ENTITY_TYPE_delete() for user_role entities.

File

./shortcutperrole.module, line 51
Allows users to manage customizable lists of shortcut links.

Code

function shortcutperrole_user_role_delete($role) {
  $config = 'shortcutperrole.settings.role.' . $role
    ->id();
  \Drupal::service('config.factory')
    ->getEditable($config)
    ->delete();
}