3namespace Bitrix\Calendar\Integration\UI\EntitySelector\OpenEvents;
5use Bitrix\Calendar\Integration\Im\EventCategoryService;
6use Bitrix\Main\Engine\CurrentUser;
7use Bitrix\UI\EntitySelector\BaseProvider;
8use Bitrix\UI\EntitySelector\Dialog;
9use Bitrix\UI\EntitySelector\Item;
19 parent::__construct();
21 $this->userId = (int)CurrentUser::get()->getId();
26 return $this->userId > 0;
31 return $this->getChannels();
36 $dialog->
addItems($this->getChannels());
39 private function getChannels():
array
43 return array_map(
static fn (
array $it) => self::makeItem($it), $channels);
46 private static function makeItem(
array $item):
Item
50 'entityId' => self::ENTITY_ID,
51 'title' => $item[
'title'],
53 'avatar' => $item[
'avatar'],
55 'color' => $item[
'color'],
56 'closed' => $item[
'closed'],
fillDialog(Dialog $dialog)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)