You are here

function registration_admin_paths in Entity Registration 8.2

Same name and namespace in other branches
  1. 8 registration.module \registration_admin_paths()
  2. 7.2 registration.module \registration_admin_paths()
  3. 7 registration.module \registration_admin_paths()

Implements hook_admin_paths().

File

./registration.module, line 282

Code

function registration_admin_paths() {
  $paths = array();
  if (\Drupal::config('registration.settings')
    ->get('registration_paths_administrative')) {
    foreach (registration_get_registration_instances() as $instance) {
      $type = $instance['entity_type'];
      if (!in_array($type, array(
        'registration',
        'registration_type',
      ))) {
        $paths[$type . '/*/registrations'] = TRUE;
        $paths[$type . '/*/registrations/list'] = TRUE;
        $paths[$type . '/*/registrations/settings'] = TRUE;
        $paths[$type . '/*/registrations/broadcast'] = TRUE;
      }
    }
  }
  return $paths;
}