ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\Data\Text\HTML\ExportOptionBase Class Reference
+ Inheritance diagram for ILIAS\Data\Text\HTML\ExportOptionBase:
+ Collaboration diagram for ILIAS\Data\Text\HTML\ExportOptionBase:

Public Member Functions

 init (Container $DIC)
 
 onDeleteFiles (ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
 
 onDownloadFiles (ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
 
 onDownloadWithLink (ReferenceId $reference_id, ilExportHandlerConsumerFileIdentifierInterface $file_identifier)
 
 getFileSelection (ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
 
 getFiles (ilExportHandlerConsumerContextInterface $context)
 
- Public Member Functions inherited from ILIAS\Export\ExportHandler\Consumer\ExportOption\BasicHandler
 __construct ()
 
 isObjectSupported (ObjectId $object_id)
 
 isPublicAccessPossible ()
 

Protected Attributes

ilExportHTMLStakeholder $stakeholder
 
ExportFileDBRepository $repo
 
ilCtrl $ctrl
 
ilDataFactory $data_factory
 

Detailed Description

Definition at line 38 of file ExportOptionBase.php.

Member Function Documentation

◆ getFiles()

ILIAS\Data\Text\HTML\ExportOptionBase::getFiles ( ilExportHandlerConsumerContextInterface  $context)

Definition at line 99 of file ExportOptionBase.php.

Referenced by ilLearningModuleExportOptionHTML\getFileSelection(), and ILIAS\Data\Text\HTML\ExportOptionBase\getFileSelection().

101  : ilExportHandlerFileInfoCollectionInterface {
102  $collection_builder = $context->fileCollectionBuilder();
103  $object_id = $this->data_factory->objId($context->exportObject()->getId());
104  foreach ($this->repo->getAllOfObjectId($context->exportObject()->getId()) as $file) {
105  $collection_builder = $collection_builder->withResourceIdentifier(
106  $this->repo->getResourceIdForIdString($file->getRid()),
107  $object_id,
108  $this
109  );
110  }
111  return $collection_builder->collection();
112  }
$context
Definition: webdav.php:31
+ Here is the caller graph for this function:

◆ getFileSelection()

ILIAS\Data\Text\HTML\ExportOptionBase::getFileSelection ( ilExportHandlerConsumerContextInterface  $context,
ilExportHandlerConsumerFileIdentifierCollectionInterface  $file_identifiers 
)

Definition at line 85 of file ExportOptionBase.php.

References ILIAS\Data\Text\HTML\ExportOptionBase\getFiles().

88  : ilExportHandlerFileInfoCollectionInterface {
89  $collection_builder = $context->fileCollectionBuilder();
90  $file_identifiers_array = $file_identifiers->toStringArray();
91  foreach ($this->getFiles($context) as $file) {
92  if (in_array($file->getFileIdentifier(), $file_identifiers_array)) {
93  $collection_builder = $collection_builder->withFileInfo($file);
94  }
95  }
96  return $collection_builder->collection();
97  }
$context
Definition: webdav.php:31
getFiles(ilExportHandlerConsumerContextInterface $context)
+ Here is the call graph for this function:

◆ init()

ILIAS\Data\Text\HTML\ExportOptionBase::init ( Container  $DIC)

Definition at line 45 of file ExportOptionBase.php.

References ILIAS\Repository\ctrl().

45  : void
46  {
47  $this->ctrl = $DIC->ctrl();
48  $this->data_factory = new ilDataFactory();
49  $this->repo = $DIC->export()->internal()->repo()->html()->exportFile();
50  $this->stakeholder = new \ilExportHTMLStakeholder();
51  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

◆ onDeleteFiles()

ILIAS\Data\Text\HTML\ExportOptionBase::onDeleteFiles ( ilExportHandlerConsumerContextInterface  $context,
ilExportHandlerConsumerFileIdentifierCollectionInterface  $file_identifiers 
)

Definition at line 53 of file ExportOptionBase.php.

56  : void {
57  foreach ($file_identifiers as $file_identifier) {
58  $rid = $file_identifier->getIdentifier();
59  $this->repo->delete(
60  $context->exportObject()->getId(),
61  $rid
62  );
63  }
64  }
$context
Definition: webdav.php:31

◆ onDownloadFiles()

ILIAS\Data\Text\HTML\ExportOptionBase::onDownloadFiles ( ilExportHandlerConsumerContextInterface  $context,
ilExportHandlerConsumerFileIdentifierCollectionInterface  $file_identifiers 
)

Definition at line 66 of file ExportOptionBase.php.

69  : void {
70  foreach ($file_identifiers as $file_identifier) {
71  $rid = $file_identifier->getIdentifier();
72  $this->repo->deliverFile($rid);
73  }
74  }

◆ onDownloadWithLink()

ILIAS\Data\Text\HTML\ExportOptionBase::onDownloadWithLink ( ReferenceId  $reference_id,
ilExportHandlerConsumerFileIdentifierInterface  $file_identifier 
)

Definition at line 76 of file ExportOptionBase.php.

References exit.

79  : void {
80  $rid = $file_identifier->getIdentifier();
81  $this->repo->deliverFile($rid);
82  exit;
83  }
exit

Field Documentation

◆ $ctrl

ilCtrl ILIAS\Data\Text\HTML\ExportOptionBase::$ctrl
protected

Definition at line 42 of file ExportOptionBase.php.

◆ $data_factory

ilDataFactory ILIAS\Data\Text\HTML\ExportOptionBase::$data_factory
protected

Definition at line 43 of file ExportOptionBase.php.

◆ $repo

ExportFileDBRepository ILIAS\Data\Text\HTML\ExportOptionBase::$repo
protected

Definition at line 41 of file ExportOptionBase.php.

◆ $stakeholder

ilExportHTMLStakeholder ILIAS\Data\Text\HTML\ExportOptionBase::$stakeholder
protected

Definition at line 40 of file ExportOptionBase.php.


The documentation for this class was generated from the following file: