- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/slider/factory/sliderfactory.php
- Класс: BitrixTasksSliderFactorySliderFactory
- Вызов: SliderFactory::createEntitySlider
public function createEntitySlider(
int $entityId,
string $entityType,
int $ownerId,
string $context
): TasksSliderInterface
{
switch ($entityType)
{
case self::TASK:
if (!in_array($context, [PathMaker::PERSONAL_CONTEXT, PathMaker::GROUP_CONTEXT], true))
{
throw new UnknownEntityContextException('Wrong entity context.');
}
$pathService = new TaskPathMaker($entityId, $this->action, $ownerId, $context);
break;
case self::TEMPLATE:
$pathService = new TemplatePathMaker($entityId, $this->action, $ownerId, $context);
break;
default:
throw new UnknownEntityTypeException('Wrong entity type.');
}
$pathService->setQueryParams($this->queryParams);
$entityPath = $pathService->makeEntityPath();
$entityListPath = $pathService->makeEntitiesListPath();
return new TasksSlider($entityPath, $entityListPath, $this->skipEvents);
}