id(); # $roles = Role::loadMultiple(['opencase_admin', 'overseer']); # foreach ($roles as $role) { # $role->grantPermission("view published $type entities"); # $role->grantPermission("edit $type entities"); # $role->grantPermission("delete $type entities"); # $role->grantPermission("add new $type entities"); # } # \Drupal::logger('foo')->notice("
".print_r(user_role_permissions(['overseer']), true) . ""); # } #} /** * Implements hook_help(). */ function opencase_defaults_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the opencase_defaults module. case 'help.page.opencase_defaults': $output = ''; $output .= '
' . t('OpenCase Default Configuration') . '
'; return $output; default: } } /** * Implements hook_theme(). */ function opencase_defaults_theme() { return [ 'opencase_defaults' => [ 'render element' => 'children', ], ]; }