You are here

function casetracker_is_case in Case Tracker 6

Same name and namespace in other branches
  1. 7 casetracker.module \casetracker_is_case()

API function for checking whether a node type is a casetracker case.

7 calls to casetracker_is_case()
casetracker_basic_case_form in ./casetracker_basic.module
Implementation of hook_form().
casetracker_comment in ./casetracker.module
Implementation of hook_comment().
casetracker_form_alter in ./casetracker.module
Implementation of hook_form_alter().
casetracker_form_comment_form_alter in ./casetracker.module
Implementation of hook_form_comment_form_alter().
casetracker_nodeapi in ./casetracker.module
Implementation of hook_nodeapi().

... See full list

File

./casetracker.module, line 998
Enables the handling of projects and their cases.

Code

function casetracker_is_case($node) {
  if (is_object($node) && !empty($node->type)) {
    $type = $node->type;
  }
  else {
    if (is_string($node)) {
      $type = $node;
    }
  }
  if ($type) {
    return in_array($type, variable_get('casetracker_case_node_types', array(
      'casetracker_basic_case',
    )), TRUE);
  }
  return FALSE;
}