You are here

function _casetracker_actions_get_nid in Case Tracker 7

Same name and namespace in other branches
  1. 6 casetracker_actions/casetracker_actions.module \_casetracker_actions_get_nid()

Get nid from action invocation. Failing that, grab it off the current node.

6 calls to _casetracker_actions_get_nid()
casetracker_actions_set_assign_to_action in casetracker_actions/casetracker_actions.module
Set Assign to action behavior.
casetracker_actions_set_priority_action in casetracker_actions/casetracker_actions.module
Set Priority action behavior.
casetracker_actions_set_project_action in casetracker_actions/casetracker_actions.module
Set Project action behavior.
casetracker_actions_set_status_action in casetracker_actions/casetracker_actions.module
Set Status action behavior.
casetracker_actions_set_type_action in casetracker_actions/casetracker_actions.module
Set Type action behavior.

... See full list

File

casetracker_actions/casetracker_actions.module, line 286
casetracker_actions.module

Code

function _casetracker_actions_get_nid($object_nid, $context_nid) {

  // get the nid from the object.
  if (isset($object_nid)) {
    $nid = $object_nid;
  }
  elseif (isset($context_nid)) {
    $nid = $context_nid;
  }
  elseif (arg(0) == 'node') {
    $nid = arg(1);
  }
  return $nid;
}