You are here

function casetracker_is_project in Case Tracker 6

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

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

3 calls to casetracker_is_project()
casetracker_basic_project_form in ./casetracker_basic.module
Implementation of hook_form().
casetracker_nodeapi in ./casetracker.module
Implementation of hook_nodeapi().
casetracker_notifications_notifications_object_node in casetracker_notifications/casetracker_notifications.module
Implementation of hook_notifications_object_node()

File

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

Code

function casetracker_is_project($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_project_node_types', array(
      'casetracker_basic_project',
    )), TRUE);
  }
  return FALSE;
}