You are here

function casetracker_is_case in Case Tracker 7

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

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

15 calls to casetracker_is_case()
casetracker_comment_delete in ./casetracker.module
Implements hook_comment_delete().
casetracker_comment_insert in ./casetracker.module
Implements hook_comment_insert().
casetracker_comment_update in ./casetracker.module
Implements hook_comment_update().
casetracker_comment_view in ./casetracker.module
Implements hook_comment_view().
casetracker_form_alter in ./casetracker.module
Implements hook_form_alter().

... See full list

File

./casetracker.module, line 1281
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 (isset($type)) {
    return in_array($type, variable_get('casetracker_case_node_types', array(
      'casetracker_basic_case',
    )), TRUE);
  }
  return FALSE;
}