ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWikiExportOptionHTML.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24use ILIAS\Export\ExportHandler\I\Consumer\Context\HandlerInterface as ilExportHandlerConsumerContextInterface;
26use ILIAS\Export\ExportHandler\I\Info\File\CollectionInterface as ilExportHandlerFileInfoCollectionInterface;
27use ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\CollectionInterface as ilExportHandlerConsumerFileIdentifierCollectionInterface;
28use ILIAS\Export\ExportHandler\I\Consumer\File\Identifier\HandlerInterface as ilExportHandlerConsumerFileIdentifierInterface;
30
32{
33 protected ilLanguage $lng;
34
35 public function init(Container $DIC): void
36 {
37 $this->lng = $DIC->language();
39 }
40
41 public function isPublicAccessPossible(): bool
42 {
43 return true;
44 }
45
46 public function getExportType(): string
47 {
48 return 'html';
49 }
50
51 public function getExportOptionId(): string
52 {
53 return 'wiki_exp_option_html';
54 }
55
56 public function getSupportedRepositoryObjectTypes(): array
57 {
58 return ['wiki'];
59 }
60
61 public function getLabel(): string
62 {
63 $this->lng->loadLanguageModule('exp');
64 return $this->lng->txt('exp_format_dropdown-html');
65 }
66
67 public function onExportOptionSelected(ilExportHandlerConsumerContextInterface $context): void
68 {
70 $wiki = $context->exportObject();
71 $cont_exp = new WikiHtmlExport($wiki);
72 $cont_exp->setMode(WikiHtmlExport::MODE_DEFAULT);
73 $cont_exp->buildExportFile();
74 $this->ctrl->redirectByClass(ilExportGUI::class, ilExportGUI::CMD_LIST_EXPORT_FILES);
75 }
76}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
language()
Get interface to the i18n service.
Definition: Container.php:95
Wiki HTML exporter class.
const CMD_LIST_EXPORT_FILES
language handling
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31