ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilHTLMExportOptionHTML Class Reference
+ Inheritance diagram for ilHTLMExportOptionHTML:
+ Collaboration diagram for ilHTLMExportOptionHTML:

Public Member Functions

 init (Container $DIC)
 
 getExportType ()
 
 getExportOptionId ()
 
 getSupportedRepositoryObjectTypes ()
 
 getLabel ()
 
 onExportOptionSelected (ilExportHandlerConsumerContextInterface $context)
 
- Public Member Functions inherited from ILIAS\Export\ExportHandler\Consumer\ExportOption\BasicLegacyHandler
 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

ilCtrl $ctrl
 
ilLanguage $lng
 
IRSS $irss
 
Filesystem $storage
 
- Protected Attributes inherited from ILIAS\Export\ExportHandler\Consumer\ExportOption\BasicLegacyHandler
ilCtrl $ctrl
 
ilDataFactory $data_factory
 

Detailed Description

Definition at line 29 of file class.ilHTLMExportOptionHTML.php.

Member Function Documentation

◆ getExportOptionId()

ilHTLMExportOptionHTML::getExportOptionId ( )

Definition at line 50 of file class.ilHTLMExportOptionHTML.php.

50  : string
51  {
52  return "htlm_exp_option_html";
53  }

◆ getExportType()

ilHTLMExportOptionHTML::getExportType ( )

Definition at line 45 of file class.ilHTLMExportOptionHTML.php.

45  : string
46  {
47  return "html";
48  }

◆ getLabel()

ilHTLMExportOptionHTML::getLabel ( )

Definition at line 60 of file class.ilHTLMExportOptionHTML.php.

References ILIAS\Repository\lng().

60  : string
61  {
62  $this->lng->loadLanguageModule('exp');
63  return $this->lng->txt("exp_format_dropdown-html");
64  }
+ Here is the call graph for this function:

◆ getSupportedRepositoryObjectTypes()

ilHTLMExportOptionHTML::getSupportedRepositoryObjectTypes ( )

Definition at line 55 of file class.ilHTLMExportOptionHTML.php.

55  : array
56  {
57  return ["htlm"];
58  }

◆ init()

ilHTLMExportOptionHTML::init ( Container  $DIC)

Definition at line 36 of file class.ilHTLMExportOptionHTML.php.

References ILIAS\Repository\ctrl(), ILIAS\DI\Container\ctrl(), ILIAS\DI\Container\filesystem(), init(), ILIAS\DI\Container\language(), ILIAS\Repository\lng(), and ILIAS\DI\Container\resourceStorage().

36  : void
37  {
38  $this->ctrl = $DIC->ctrl();
39  $this->lng = $DIC->language();
40  $this->irss = $DIC->resourceStorage();
41  $this->storage = $DIC->filesystem()->storage();
42  parent::init($DIC);
43  }
language()
Get interface to the i18n service.
Definition: Container.php:95
filesystem()
Get the Filesystem service interface.
Definition: Container.php:144
ctrl()
Get the interface to the control structure.
Definition: Container.php:63
+ Here is the call graph for this function:

◆ onExportOptionSelected()

ilHTLMExportOptionHTML::onExportOptionSelected ( ilExportHandlerConsumerContextInterface  $context)

Definition at line 66 of file class.ilHTLMExportOptionHTML.php.

References ilExport\_createExportDirectory(), ilExport\_getExportDirectory(), ILIAS\Repository\ctrl(), and IL_INST_ID.

68  : void {
69  $object = $context->exportObject();
70 
72  $object->getId(),
73  "html",
74  $object->getType()
75  );
76  $export_dir = ilExport::_getExportDirectory(
77  $object->getId(),
78  "html",
79  $object->getType()
80  );
81 
82  // write files as zip to legacy storage
83  $date = time();
84  $zip_file = LegacyPathHelper::createRelativePath(
85  $export_dir . "/" . $date . "__" . IL_INST_ID . "__" .
86  $object->getType() . "_" . $object->getId() . ".zip"
87  );
88 
89  $stream = $this->irss->consume()->stream($object->getResource()->getIdentification())->getStream();
90  $this->storage->writeStream($zip_file, $stream);
91 
92  $this->ctrl->redirect($context->exportGUIObject(), $context->exportGUIObject()::CMD_LIST_EXPORT_FILES);
93  }
$context
Definition: webdav.php:31
const IL_INST_ID
Definition: constants.php:40
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilHTLMExportOptionHTML::$ctrl
protected

Definition at line 31 of file class.ilHTLMExportOptionHTML.php.

◆ $irss

IRSS ilHTLMExportOptionHTML::$irss
protected

Definition at line 33 of file class.ilHTLMExportOptionHTML.php.

◆ $lng

ilLanguage ilHTLMExportOptionHTML::$lng
protected

Definition at line 32 of file class.ilHTLMExportOptionHTML.php.

◆ $storage

Filesystem ilHTLMExportOptionHTML::$storage
protected

Definition at line 34 of file class.ilHTLMExportOptionHTML.php.


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