6use Bitrix\Im\Model\EO_LinkTask;
19 $this->initByDefault();
29 return LinkTaskTable::class;
34 return \Bitrix\Im\V2\Entity\Task\TaskItem::class;
44 $entity = \Bitrix\Im\V2\Entity\Task\TaskItem::initByRow($row);
48 ->setId($row[
'IM_CHAT_ID'])
49 ->setChatId($row[
'IM_CHAT_CHAT_ID'])
50 ->setMessageId($row[
'IM_CHAT_MESSAGE_ID'])
51 ->setAuthorId($row[
'IM_CHAT_AUTHOR_ID'])
52 ->setDateCreate(
new DateTime($row[
'CREATED_DATE']))
60 $chatTask = LinkTaskTable::query()
61 ->setSelect([
'ID',
'MESSAGE_ID',
'CHAT_ID',
'TASK_ID',
'AUTHOR_ID',
'DATE_CREATE'])
62 ->where(
'TASK_ID',
$entity->getTaskId())
67 if ($chatTask ===
null)
72 $taskItem =
new static($chatTask);
80 $chatTask = LinkTaskTable::query()
81 ->setSelect([
'ID',
'MESSAGE_ID',
'CHAT_ID',
'TASK_ID',
'AUTHOR_ID',
'DATE_CREATE'])
87 if ($chatTask ===
null)
92 return new static($chatTask);
105 if (isset($this->entity))
static getRestEntityName()
static getEntityClassName()
static getByEntity(\Bitrix\Im\V2\Entity\Task\TaskItem $entity)
static initByRow(array $row)
__construct($source=null)
static getByMessageId(int $messageId)
static getEntityIdFieldName()