Documentation

getAllowedActions

array
public function getAllowedActions(
	$bReturnAsStrings = false
);

This method returns an array that describes available actions for the task.

Method parameters

ParameterDescription
$bReturnAsStringsIf false (by default), then an array of available action IDs is returned (for CTaskItem::ACTION_* constant), otherwise, an associative array is returned, which keys are names of actions (match with names of constants), and with values — true (action permitted) or false (action prohibited).

Example of returned value with $bReturnAsStrings === false:

array(7) {
  [0]=>
  int(9)
  [1]=>
  int(8)
  [2]=>
  int(3)
  [3]=>
  int(6)
  [4]=>
  int(7)
  [5]=>
  int(10)
  [7]=>
  int(13)
}

Example of returned value with $bReturnAsStrings === true:

array(12) {
  ["ACTION_ACCEPT"]=>
  bool(false)
  ["ACTION_DECLINE"]=>
  bool(false)
  ["ACTION_COMPLETE"]=>
  bool(true)
  ["ACTION_APPROVE"]=>
  bool(false)
  ["ACTION_DISAPPROVE"]=>
  bool(false)
  ["ACTION_START"]=>
  bool(true)
  ["ACTION_DELEGATE"]=>
  bool(true)
  ["ACTION_REMOVE"]=>
  bool(true)
  ["ACTION_EDIT"]=>
  bool(true)
  ["ACTION_DEFER"]=>
  bool(true)
  ["ACTION_RENEW"]=>
  bool(false)
  ["ACTION_CREATE"]=>
  bool(false)
}


© «Bitrix24», 2001-2024