ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBlogExportOptionHTMLWithComments.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 ilBlogExportOptionHTMLWithComments extends ilBasicLegacyExportOption
27{
28 protected ilLanguage $lng;
29
30 public function init(
32 ): void {
33 $this->lng = $DIC->language();
35 }
36
37 public function isObjectSupported(
38 ObjectId $object_id
39 ): bool {
40 return ilObjBlogAccess::isCommentsExportPossible($object_id->toInt());
41 }
42
43 public function getExportType(): string
44 {
45 return 'html_comments';
46 }
47
48 public function getExportOptionId(): string
49 {
50 return 'blog_exp_option_html_with_comments';
51 }
52
53 public function getSupportedRepositoryObjectTypes(): array
54 {
55 return ['blog'];
56 }
57
58 public function getLabel(): string
59 {
60 $this->lng->loadLanguageModule('exp');
61 return $this->lng->txt("exp_format_dropdown-html") . " (" . $this->lng->txt("blog_incl_comments") . ")";
62 }
63
64 public function onExportOptionSelected(
65 ilExportHandlerConsumerContextInterface $context
66 ): void {
67 $this->ctrl->redirectByClass(ilObjBlogGUI::class, "createExportFileWithComments");
68 }
69}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
onExportOptionSelected(ilExportHandlerConsumerContextInterface $context)
language handling
Class ilObjBlogAccess.
@ilCtrl_Calls ilObjBlogGUI: ilBlogPostingGUI, ilWorkspaceAccessGUI @ilCtrl_Calls ilObjBlogGUI: ilInfo...
return['delivery_method'=> 'php',]
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
$context
Definition: webdav.php:31