19 declare(strict_types=1);
40 $this->export_handler =
new ilExportHandler();
45 return self::NAMESPACE;
52 return $response_factory->can($context->
ctrl()->getLinkTargetByClass(ilDashboardGUI::class));
55 $object_id =
$ref_id->toObjectId();
56 $access_granted =
false;
58 $key = $this->export_handler->publicAccess()->repository()->key()->handler()->withObjectId($object_id);
59 $element = $this->export_handler->publicAccess()->repository()->handler()->getElement($key);
60 $export_option = is_null($element)
62 : $this->export_handler->consumer()->exportOption()->exportOptionWithId($element->getValues()->getExportOptionId());
64 $access_granted =
true;
71 $access_granted =
true;
75 is_null($export_option) or
76 !$export_option->isPublicAccessPossible() or
78 $operation !== self::DOWNLOAD
80 return $response_factory->can($context->
ctrl()->getLinkTargetByClass(ilDashboardGUI::class));
82 $export_option->onDownloadWithLink(
84 $this->export_handler->consumer()->file()->identifier()->handler()->withIdentifier($element->getValues()->getIdentification())
86 return $response_factory->cannot();
getAdditionalParameters()
checkPermission(string $permission, int $ref_id)
ilExportHandler $export_handler
handle(Request $request, Context $context, Factory $response_factory)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null