3namespace Bitrix\Im\V2\Link\Task;
5use Bitrix\Im\Model\LinkTaskTable;
6use Bitrix\Im\Model\EO_LinkTask;
7use Bitrix\Im\V2\Link\BaseLinkItem;
8use Bitrix\Im\V2\Rest\RestEntity;
9use Bitrix\Main\Type\DateTime;
20 $this->initByDefault();
30 return LinkTaskTable::class;
35 return \Bitrix\Im\V2\Entity\Task\TaskItem::class;
49 ->setId($row[
'IM_CHAT_ID'])
50 ->setChatId($row[
'IM_CHAT_CHAT_ID'])
51 ->setMessageId($row[
'IM_CHAT_MESSAGE_ID'])
52 ->setAuthorId($row[
'IM_CHAT_AUTHOR_ID'])
53 ->setDateCreate(
new DateTime($row[
'CREATED_DATE']))
62 if ($taskItem ===
null)
74 if (array_key_exists(
$entity->getTaskId(), self::$cache))
76 return self::$cache[
$entity->getTaskId()];
79 $chatTask = LinkTaskTable::query()
80 ->setSelect([
'ID',
'MESSAGE_ID',
'CHAT_ID',
'TASK_ID',
'AUTHOR_ID',
'DATE_CREATE'])
81 ->where(
'TASK_ID',
$entity->getTaskId())
86 if ($chatTask ===
null)
88 self::$cache[
$entity->getTaskId()] =
null;
93 self::$cache[
$entity->getTaskId()] =
new static($chatTask);
95 return self::$cache[
$entity->getTaskId()];
100 $chatTask = LinkTaskTable::query()
101 ->setSelect([
'ID',
'MESSAGE_ID',
'CHAT_ID',
'TASK_ID',
'AUTHOR_ID',
'DATE_CREATE'])
107 if ($chatTask ===
null)
112 return new static($chatTask);
125 if (isset($this->entity))
144 unset(self::$cache[$taskId]);
static initByRow(array $row)
static getById(int $id, ?Context $context=null)
static getRestEntityName()
static getEntityClassName()
static cleanCache(int $taskId)
static getByEntity(\Bitrix\Im\V2\Entity\Task\TaskItem $entity)
static initByRow(array $row)
__construct($source=null)
static getByMessageId(int $messageId)
static getByEntityInternal(\Bitrix\Im\V2\Entity\Task\TaskItem $entity)
static getEntityIdFieldName()
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)