• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/comments/task/commentposter.php
  • Класс: BitrixTasksCommentsTaskCommentPoster
  • Вызов: CommentPoster::getCommentActionUrl
static function getCommentActionUrl(int $userId, int $taskId, string $action): string
{
	$url = new Uri("/company/personal/user/{$userId}/tasks/task/view/{$taskId}/");
	$url->addParams([
		'commentAction' => lcfirst(StringHelper::snake2camel($action)),
	]);

	if (
		$action === 'DEADLINE_CHANGE'
		&& ($deadline = (TaskRegistry::getInstance())->get($taskId)['DEADLINE'])
	)
	{
		$url->addParams([
			'deadline' => $deadline->getTimestamp(),
		]);
	}

	return $url->getUri();
}