9use Bitrix\Im\V2\Common\SidebarFilterProcessorTrait;
22 use SidebarFilterProcessorTrait;
23 use MigrationStatusCheckerTrait;
29 return UrlItem::class;
34 if (!static::isMigrationFinished())
39 $saveResult = parent::save($isGroupSave);
40 LinkUrlIndexTable::indexInBackground();
49 return static::linkEntityToMessage($entities,
$message);
52 public static function find(
60 $urlOrder = [
'MESSAGE_ID' =>
'DESC'];
62 if (isset(
$order[
'MESSAGE_ID']))
64 $urlOrder[
'MESSAGE_ID'] =
$order[
'MESSAGE_ID'];
67 $query = LinkUrlTable::query()
68 ->setSelect([
'ID',
'URL',
'DATE_CREATE',
'MESSAGE_ID',
'CHAT_ID',
'PREVIEW_URL_ID',
'AUTHOR_ID'])
77 $query->setOffset($offset);
81 $urlCollection =
new static(
$query->fetchCollection());
83 return $urlCollection->fillMetadata();
92 foreach ($this as
$url)
94 if ($entities->getById(
$url->getEntityId()) !==
null)
96 $url->setEntity($entities->getById(
$url->getEntityId()));
109 LinkUrlTable::deleteByFilter([
'=MESSAGE_ID' => $messagesIds]);
114 LinkUrlTable::deleteByFilter([
'=CHAT_ID' => $chatsIds]);
119 LinkUrlTable::deleteByFilter([
'=AUTHOR_ID' => $authorsIds]);
126 if (isset(
$filter[
'SEARCH_URL']))
128 $query->whereLike(
'URL',
"%{$filter['SEARCH_URL']}%");
static initByPreviewUrlsIds(array $previewUrlsIds, bool $withHtml=true)
static initByMessage(\Bitrix\Im\V2\Message $message)
save(bool $isGroupSave=false)
static deleteByChatsIds(array $chatsIds)
static getCollectionElementClass()
static processFilters(Query $query, array $filter, array $order)
static string $migrationOptionName
fillMetadata(bool $withHtml=true)
static initByMessage(Message $message)
static deleteByMessagesIds(array $messagesIds)
static find(array $filter, array $order=['MESSAGE_ID'=> 'DESC'], ?int $limit=null, ?Context $context=null, ?int $offset=null)
static deleteByAuthorsIds(array $authorsIds)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
trait MigrationStatusCheckerTrait