ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilBlogExportOptionHTMLWithComments.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 use ILIAS\Export\ExportHandler\I\Consumer\Context\HandlerInterface as ilExportHandlerConsumerContextInterface;
25 
26 class ilBlogExportOptionHTMLWithComments extends ilBasicLegacyExportOption
27 {
28  protected ilLanguage $lng;
29 
30  public function init(
32  ): void {
33  $this->lng = $DIC->language();
34  parent::init($DIC);
35  }
36 
37  public function isObjectSupported(
38  ObjectId $object_id
39  ): bool {
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 }
$context
Definition: webdav.php:31
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
onExportOptionSelected(ilExportHandlerConsumerContextInterface $context)
global $DIC
Definition: shib_login.php:26
static isCommentsExportPossible(int $blog_id)
language()
Get interface to the i18n service.
Definition: Container.php:95