• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/ui/entityselector/tasktemplateprovider.php
  • Класс: BitrixTasksIntegrationUIEntitySelectorTaskTemplateProvider
  • Вызов: TaskTemplateProvider::fillDialog
public function fillDialog(Dialog $dialog): void
{
	$this->fillWithRecentItems($dialog);

	if ($dialog->getItemCollection()->count() < static::LIMIT)
	{
		$templateItems = $this->getTemplateItems(['excludeIds' => $this->getRecentItemsIds($dialog)]);
		foreach ($templateItems as $item)
		{
			/** @var Item $item */
			$item->addTab('recents');
			$dialog->addItem($item);

			if ($dialog->getItemCollection()->count() >= static::LIMIT)
			{
				break;
			}
		}
	}
}