You are here

function node_accessibility_is_required in Node Accessibility 7

Returns TRUE if accessibility validation functionality is required.

Parameters

string $node_type: A node type string

Return value

bool|null TRUE or FALSE depending on whether or not accessibility validation functionality is required for the given node type. NULL is returned if accessibility validation functionality is not enabled.

1 call to node_accessibility_is_required()
node_accessibility_rules_condition_content_is_requiring_node_accessibility_validation in ./node_accessibility.rules.inc
Condition: Check if the content is requiring accessibility validation.

File

./node_accessibility.module, line 769
Module file for the node accessibility project.

Code

function node_accessibility_is_required($node_type) {
  $node_type_settings = node_accessibility_load_node_type_settings();
  if (!isset($node_type_settings[$node_type]) || $node_type_settings[$node_type] === FALSE) {
    return NULL;
  }
  if (isset($node_type_settings[$node_type]['required']) && $node_type_settings[$node_type]['required'] === TRUE) {
    return TRUE;
  }
  return FALSE;
}