ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

60 : string
61 {
62 $this->lng->loadLanguageModule('exp');
63 return $this->lng->txt("exp_format_dropdown-html");
64 }

References ILIAS\Repository\lng().

+ 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)

Reimplemented from ILIAS\Export\ExportHandler\Consumer\ExportOption\BasicLegacyHandler.

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

36 : void
37 {
38 $this->ctrl = $DIC->ctrl();
39 $this->lng = $DIC->language();
40 $this->irss = $DIC->resourceStorage();
41 $this->storage = $DIC->filesystem()->storage();
43 }
language()
Get interface to the i18n service.
Definition: Container.php:95
ctrl()
Get the interface to the control structure.
Definition: Container.php:63
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\DI\Container\ctrl(), ILIAS\Repository\ctrl(), init(), ILIAS\DI\Container\language(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ onExportOptionSelected()

ilHTLMExportOptionHTML::onExportOptionSelected ( ilExportHandlerConsumerContextInterface  $context)

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

68 : void {
69 $object = $context->exportObject();
70
72 $object->getId(),
73 "html",
74 $object->getType()
75 );
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 }
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
@depricated Get export directory for an repository object
const IL_INST_ID
Definition: constants.php:40
$context
Definition: webdav.php:31

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: