ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilForumExportOptionHTML.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22use ILIAS\Export\ExportHandler\I\Consumer\Context\HandlerInterface as ilExportHandlerConsumerContextInterface;
25
26class ilForumExportOptionHTML extends ilBasicExportOption
27{
28 protected ilLanguage $lng;
30
31 public function init(Container $DIC): void
32 {
33 $this->lng = $DIC->language();
34 $this->ctrl = $DIC->ctrl();
35 }
36
37 public function getExportType(): string
38 {
39 return 'html';
40 }
41
42 public function getExportOptionId(): string
43 {
44 return 'frm_exp_option_html';
45 }
46
47 public function getSupportedRepositoryObjectTypes(): array
48 {
49 return ['frm'];
50 }
51
52 public function getLabel(): string
53 {
54 $this->lng->loadLanguageModule('exp');
55 return $this->lng->txt('exp_format_dropdown-html');
56 }
57
58 public function onExportOptionSelected(ilExportHandlerConsumerContextInterface $context): void
59 {
60 $fex_gui = new ilForumExportGUI();
61 $fex_gui->exportHTML();
62 $this->ctrl->redirectByClass(ilObjForumGUI::class, 'export');
63 }
64
65 public function onDeleteFiles(
66 ilExportHandlerConsumerContextInterface $context,
67 \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers
68 ): void {
69 # Direct download on export creation, no local files
70 }
71
72 public function onDownloadFiles(
73 ilExportHandlerConsumerContextInterface $context,
74 \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers
75 ): void {
76 # Direct download on export creation, no local files
77 }
78
79 public function onDownloadWithLink(
80 \ILIAS\Data\ReferenceId $reference_id,
81 \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\HandlerInterface $file_identifier
82 ): void {
83 # Direct download on export creation, no local files
84 }
85
86 public function getFiles(
87 ilExportHandlerConsumerContextInterface $context
88 ): \ILIAS\Export\ExportHandler\I\Info\File\CollectionInterface {
89 # Direct download on export creation, no local files
90 return $context->fileCollectionBuilder()->collection();
91 }
92
93 public function getFileSelection(
94 ilExportHandlerConsumerContextInterface $context,
95 \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers
96 ): \ILIAS\Export\ExportHandler\I\Info\File\CollectionInterface {
97 # Direct download on export creation, no local files
98 return $context->fileCollectionBuilder()->collection();
99 }
100}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
language()
Get interface to the i18n service.
Definition: Container.php:95
ctrl()
Get the interface to the control structure.
Definition: Container.php:63
Forum export to HTML and Print.
onDownloadFiles(ilExportHandlerConsumerContextInterface $context, \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers)
onDeleteFiles(ilExportHandlerConsumerContextInterface $context, \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers)
onExportOptionSelected(ilExportHandlerConsumerContextInterface $context)
getFileSelection(ilExportHandlerConsumerContextInterface $context, \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface $file_identifiers)
onDownloadWithLink(\ILIAS\Data\ReferenceId $reference_id, \ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\HandlerInterface $file_identifier)
getFiles(ilExportHandlerConsumerContextInterface $context)
language handling
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31