19 declare(strict_types=1);
47 $this->
ctrl = $DIC->ctrl();
49 $this->repo = $DIC->export()->internal()->repo()->html()->exportFile();
50 $this->stakeholder = new \ilExportHTMLStakeholder();
54 ilExportHandlerConsumerContextInterface
$context,
55 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
57 foreach ($file_identifiers as $file_identifier) {
58 $rid = $file_identifier->getIdentifier();
60 $context->exportObject()->getId(),
67 ilExportHandlerConsumerContextInterface
$context,
68 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
70 foreach ($file_identifiers as $file_identifier) {
71 $rid = $file_identifier->getIdentifier();
72 $this->repo->deliverFile($rid);
78 ilExportHandlerConsumerFileIdentifierInterface $file_identifier
80 $object_id = $reference_id->
toObjectId()->toInt();
82 $file = explode(
":", trim($file_identifier->getIdentifier()));
83 var_dump($file_identifier);
89 ilExportHandlerConsumerContextInterface
$context,
90 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
91 ): ilExportHandlerFileInfoCollectionInterface {
92 $collection_builder = $context->fileCollectionBuilder();
93 $file_identifiers_array = $file_identifiers->toStringArray();
94 foreach ($this->
getFiles($context) as $file) {
95 if (in_array($file->getFileIdentifier(), $file_identifiers_array)) {
96 $collection_builder = $collection_builder->withFileInfo($file);
99 return $collection_builder->collection();
103 ilExportHandlerConsumerContextInterface
$context 104 ): ilExportHandlerFileInfoCollectionInterface {
105 $collection_builder = $context->fileCollectionBuilder();
106 $object_id = $this->data_factory->objId($context->exportObject()->getId());
107 foreach ($this->repo->getAllOfObjectId($context->exportObject()->getId()) as $file) {
108 $collection_builder = $collection_builder->withResourceIdentifier(
109 $this->repo->getResourceIdForIdString($file->getRid()),
114 return $collection_builder->collection();
getFileSelection(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
ExportFileDBRepository $repo
getFiles(ilExportHandlerConsumerContextInterface $context)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilExportHTMLStakeholder $stakeholder
onDownloadWithLink(ReferenceId $reference_id, ilExportHandlerConsumerFileIdentifierInterface $file_identifier)
onDeleteFiles(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
onDownloadFiles(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
static _lookupType(int $id, bool $reference=false)
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilDataFactory $data_factory