• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/slider/factory/sliderfactory.php
  • Класс: BitrixTasksSliderFactorySliderFactory
  • Вызов: SliderFactory::createEntityListSlider
public function createEntityListSlider(string $entityType, int $ownerId, string $context): TasksSliderInterface
{
	$width = null;
	switch ($entityType)
	{
		case self::TAGS:
			$width = 1000;
			$pathService = new TaskTagsPathMaker(0, '', $ownerId, $context);
			break;

		default:
			throw new UnknownEntityTypeException('Wrong entity type.');
	}

	$pathService->setQueryParams($this->queryParams);

	$entityPath = $pathService->makeEntityPath();
	$entityListPath = $pathService->makeEntitiesListPath();
	$slider = new TasksSlider($entityPath, $entityListPath);

	if (!is_null($width))
	{
		$slider->setWidth($width);
	}

	return $slider;
}