You are here

function pm_permission_get_enabled_types in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 includes/pm.permission.inc \pm_permission_get_enabled_types()

Returns a list of node bundles for which PM permission have been enabled.

4 calls to pm_permission_get_enabled_types()
pm_node_grants in ./pm.module
Implements hook_node_grants().
pm_node_update in ./pm.module
Implements hook_node_update().
pm_permission in ./pm.module
Implements hook_permission().
_pm_permission_get_all_child_nids in includes/pm.permission.inc
Recursively hunt for child nodes of pmorganization.

File

includes/pm.permission.inc, line 179
Main module file for the pm_permission module.

Code

function pm_permission_get_enabled_types() {
  $enabled = array();
  foreach (node_type_get_types() as $type => $info) {
    if (variable_get("pm_permission_node_{$type}_enabled", FALSE)) {
      $enabled[] = $type;
    }
  }
  return $enabled;
}