Documentation

isActionAllowed

bool 
public function isActionAllowed(
  int $actionId
);

The method verifies, whether the action is permitted.

Method parameters

Parameter Description Available from version
$actionId Action ID:
  • CTaskElapsedItem::ACTION_ELAPSED_TIME_ADD;
  • CTaskElapsedItem::ACTION_ELAPSED_TIME_MODIFY;
  • CTaskElapsedItem::ACTION_ELAPSED_TIME_REMOVE.

Returned value

This method returns true if the action was permitted, otherwise — false.

Examples of use

$taskId = ...;
$itemId = ...;
$oTask = CTaskItem::getInstance($taskId, $USER->getId());
$oElapsedItem = new CTaskElapsedItem($oTask, $itemId);
$oElapsedItem->isActionAllowed($actionId);


© «Bitrix24», 2001-2024
Up