8use Bitrix\Im\V2\Common\SidebarFilterProcessorTrait;
26 use SidebarFilterProcessorTrait;
31 public static function find(
38 if (!Loader::includeModule(
'calendar'))
45 $calendarOrder = [
'ID' =>
'DESC'];
49 $calendarOrder[
'ID'] =
$order[
'ID'];
52 $query = LinkCalendarTable::query();
55 ->setOrder($calendarOrder)
63 $links =
new static(
$query->fetchCollection());
66 return $links->fillEntities();
71 if (isset($this->entities))
84 foreach ($this as $link)
86 $id = $link->getEntityId();
88 if (!isset($id) || (
$entities->getById($id) ===
null))
93 $link->setEntity(
$entities->getById($id));
101 return parent::save(
false);
108 if (isset(
$filter[
'CALENDAR_DATE_FROM']))
110 $query->where(
'CALENDAR_DATE_FROM',
'>=',
$filter[
'CALENDAR_DATE_FROM']);
113 if (isset(
$filter[
'CALENDAR_DATE_TO']))
115 $query->where(
'CALENDAR_DATE_TO',
'<=',
$filter[
'CALENDAR_DATE_TO']);
118 if (isset(
$filter[
'SEARCH_TITLE']))
124 $query->registerRuntimeField(
128 Join::on(
'this.CALENDAR_ID',
'ref.ID'),
129 [
'join_type' => Join::TYPE_INNER]
136 return CalendarItem::class;
141 $calendarCollection = LinkCalendarTable::query()
143 ->whereIn(
'MESSAGE_ID',
$messages->getIds())
147 return new static($calendarCollection);
static getByIds(array $ids, ?Context $context=null)
static find(array $filter, array $order, ?int $limit=null, ?Context $context=null)
static getByMessages(MessageCollection $messages)
save(bool $isGroupSave=false)
static getCollectionElementClass()
static processFilters(Query $query, array $filter, array $order)
EntityCollection $entities
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)