12use Bitrix\Tasks\Internals\TaskObject;
13use Bitrix\Im\V2\Common\ContextCustomer;
14use Bitrix\Tasks\Provider\TaskList;
15use Bitrix\Tasks\Provider\TaskQuery;
54 'source' => \CTaskNotifications::getNotificationPath([
'ID' => $this->getContext()->getUserId()], $this->
getTaskId()),
60 $context = $context ?? Locator::getContext();
61 $taskQuery =
new TaskQuery($context->getUserId());
63 ->setSelect(\
Bitrix\Im\V2\
Link\Task\TaskCollection::SELECT_FIELDS)
64 ->setWhere([
'=ID' => $id])
66 $rows = (
new TaskList())->getList($taskQuery);
78 $taskEntity =
new static();
81 [(
int)$row[
'CREATED_BY']],
82 [(
int)$row[
'RESPONSIBLE_ID']],
83 array_map(
static fn ($id) => (
int)$id, $row[
'AUDITORS'] ?? []),
84 array_map(
static fn ($id) => (
int)$id, $row[
'ACCOMPLICES'] ?? [])
89 ->setTaskId((
int)$row[
'ID'])
90 ->setTitle($row[
'TITLE'])
91 ->setDeadline(isset($row[
'DEADLINE']) ?
new DateTime($row[
'DEADLINE']) :
null)
103 $taskEntity =
new static();
106 ->setTaskId($taskObject->getId())
112 ->
setMembersIds(array_unique($taskObject->getMemberList()->getUserIdList()))
120 return \CTaskNotifications::getNotificationPath(
121 [
'ID' => $this->getContext()->getUserId()],
128 if (isset($this->status))
130 $state = (new \Bitrix\Tasks\UI\Task\Deadline())->buildState($this->status, $this->deadline);
static getRestEntityName()
setDeadline(?DateTime $deadline)
toRestFormat(array $option=[])
setCreatorId(int $creatorId)
static initByRow(array $row)
getPopupData(array $excludedList=[])
setResponsibleId(int $responsibleId)
setMembersIds(array $membersIds)
setStatusTitle(string $statusTitle)
static initByTaskObject(TaskObject $taskObject)
static getById(int $id, ?Context $context=null)