You are here

function content_access_get_settings in Content Access 5

Same name and namespace in other branches
  1. 8 content_access.module \content_access_get_settings()
  2. 6 content_access.module \content_access_get_settings()
  3. 7 content_access.module \content_access_get_settings()
13 calls to content_access_get_settings()
content_access_action_reset_node_permissions in ./content_access.workflow_ng.inc
Action implementation: Reset permissions for a node.
content_access_action_set_node_permissions in ./content_access.workflow_ng.inc
Action implementation: Set permissions for a node.
content_access_admin_settings in ./content_access.module
content_access_admin_settings_submit in ./content_access.module
content_access_condition_check_permissions in ./content_access.workflow_ng.inc
Condition implementation: Check if node has permissions.

... See full list

File

./content_access.module, line 381

Code

function content_access_get_settings($return = 'all', $type = NULL) {
  if ($return == 'all') {
    return variable_get('content_access_settings', array());
  }
  if (isset($type)) {
    $settings = content_access_get_settings($return);
    return isset($settings[$type]) ? $settings[$type] : content_access_get_setting_defaults($return, $type);
  }
  if (!isset($type)) {
    $settings = content_access_get_settings();
    return isset($settings[$return]) ? $settings[$return] : array();
  }
  return array();
}