LinkCalendarIndexTable::index

  1. Bitrix24 API (v. 23.675.0)
  2. im
  3. LinkCalendarIndexTable
  4. index
  • Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/model/linkcalendarindex.php
  • Класс: BitrixImModelLinkCalendarIndexTable
  • Вызов: LinkCalendarIndexTable::index
static function index(array $ids = []): void
{
	$toIndexIds = array_merge(static::$toIndexIds, $ids);
	$toIndexIds = array_unique($toIndexIds);
	if (empty($toIndexIds))
	{
		return;
	}
	$linkWithoutIndex = LinkCalendarTable::query()
		->setSelect(['*'])
		->whereIn('ID', $toIndexIds)
		->fetchCollection()
	;
	$links = new CalendarCollection($linkWithoutIndex);
	$links->fillCalendarData();
	$inserts = [];
	foreach ($links as $link)
	{
		$inserts[] = [
			'ID' => $link->getId(),
			'SEARCH_CONTENT' => static::generateSearchIndex($link),
		];
	}
	static::multiplyInsertWithoutDuplicate($inserts);
}

Добавить комментарий