• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/dispatcher/publicaction/task.php
  • Класс: BitrixTasksDispatcherPublicActionTask
  • Вызов: Task::ping
public function ping($id): array
{
	$result = [];

	if (!TaskAccessController::can($this->userId, ActionDictionary::ACTION_TASK_READ, (int)$id))
	{
		$this->addForbiddenError();
		return $result;
	}

	$userId = UtilUser::getId();
	$task = CTaskItem::getInstance($id, $userId);
	$taskData = $task->getData(false);

	if ($taskData)
	{
		$commentPoster = CommentPoster::getInstance($id, $userId);
		$commentPoster && $commentPoster->postCommentsOnTaskStatusPinged($taskData);

		CTaskNotifications::sendPingStatusMessage($taskData, $userId);
	}

	return $result;
}