ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLearningModuleExportOptionHTML Class Reference
+ Inheritance diagram for ilLearningModuleExportOptionHTML:
+ Collaboration diagram for ilLearningModuleExportOptionHTML:

Public Member Functions

 init (Container $DIC)
 
 isPublicAccessPossible ()
 
 getExportType ()
 
 getExportOptionId ()
 
 getSupportedRepositoryObjectTypes ()
 
 getLabel ()
 
 getFileSelection (ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
 
 onExportOptionSelected (ilExportHandlerConsumerContextInterface $context)
 
- Public Member Functions inherited from ILIAS\Export\HTML\ExportOptionBase
 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 Member Functions

 getSubDirs (int $object_id)
 

Protected Attributes

ilLanguage $lng
 
ilCtrl $ctrl
 
LOMServices $lom_services
 
- Protected Attributes inherited from ILIAS\Export\HTML\ExportOptionBase
ilExportHTMLStakeholder $stakeholder
 
ExportFileDBRepository $repo
 
ilCtrl $ctrl
 
ilDataFactory $data_factory
 

Detailed Description

Definition at line 31 of file class.ilLearningModuleExportOptionHTML.php.

Member Function Documentation

◆ getExportOptionId()

ilLearningModuleExportOptionHTML::getExportOptionId ( )

Definition at line 55 of file class.ilLearningModuleExportOptionHTML.php.

55 : string
56 {
57 return "lm_exp_option_html";
58 }

◆ getExportType()

ilLearningModuleExportOptionHTML::getExportType ( )

Definition at line 50 of file class.ilLearningModuleExportOptionHTML.php.

50 : string
51 {
52 return "html";
53 }

◆ getFileSelection()

ilLearningModuleExportOptionHTML::getFileSelection ( ilExportHandlerConsumerContextInterface  $context,
ilExportHandlerConsumerFileIdentifierCollectionInterface  $file_identifiers 
)

Reimplemented from ILIAS\Export\HTML\ExportOptionBase.

Definition at line 71 of file class.ilLearningModuleExportOptionHTML.php.

74 : ilExportHandlerFileInfoCollectionInterface {
75 $collection_builder = $context->fileCollectionBuilder();
76 $file_identifiers_array = $file_identifiers->toStringArray();
77 foreach ($this->getFiles($context) as $file) {
78 if (in_array($file->getFileIdentifier(), $file_identifiers_array)) {
79 $collection_builder = $collection_builder->withFileInfo($file);
80 }
81 }
82 return $collection_builder->collection();
83 }
getFiles(ilExportHandlerConsumerContextInterface $context)
$context
Definition: webdav.php:31

◆ getLabel()

ilLearningModuleExportOptionHTML::getLabel ( )

Definition at line 65 of file class.ilLearningModuleExportOptionHTML.php.

65 : string
66 {
67 $this->lng->loadLanguageModule('exp');
68 return $this->lng->txt("exp_format_dropdown-html");
69 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getSubDirs()

ilLearningModuleExportOptionHTML::getSubDirs ( int  $object_id)
protected

Definition at line 91 of file class.ilLearningModuleExportOptionHTML.php.

91 : array
92 {
93 $langs = [];
94 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $language) {
95 $langs[] = $language->value();
96 }
97 $default_dirs = ["_html"];
98 $default_dirs = array_merge($default_dirs, ["_html_all"]);
99 return array_merge($default_dirs, array_map(function ($la) { return "_html_" . $la; }, $langs));
100 }

◆ getSupportedRepositoryObjectTypes()

ilLearningModuleExportOptionHTML::getSupportedRepositoryObjectTypes ( )

Definition at line 60 of file class.ilLearningModuleExportOptionHTML.php.

60 : array
61 {
62 return ["lm"];
63 }

◆ init()

ilLearningModuleExportOptionHTML::init ( Container  $DIC)

Reimplemented from ILIAS\Export\HTML\ExportOptionBase.

Definition at line 37 of file class.ilLearningModuleExportOptionHTML.php.

37 : void
38 {
40 $this->lng = $DIC->language();
41 $this->ctrl = $DIC->ctrl();
42 $this->lom_services = $DIC->learningObjectMetadata();
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:

◆ isPublicAccessPossible()

ilLearningModuleExportOptionHTML::isPublicAccessPossible ( )

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

Definition at line 45 of file class.ilLearningModuleExportOptionHTML.php.

45 : bool
46 {
47 return true;
48 }

◆ onExportOptionSelected()

ilLearningModuleExportOptionHTML::onExportOptionSelected ( ilExportHandlerConsumerContextInterface  $context)

Definition at line 85 of file class.ilLearningModuleExportOptionHTML.php.

87 : void {
88 $this->ctrl->redirectByClass(ilObjContentObjectGUI::class, "showExportOptionsHTML");
89 }

Field Documentation

◆ $ctrl

ilCtrl ilLearningModuleExportOptionHTML::$ctrl
protected

Definition at line 34 of file class.ilLearningModuleExportOptionHTML.php.

◆ $lng

ilLanguage ilLearningModuleExportOptionHTML::$lng
protected

Definition at line 33 of file class.ilLearningModuleExportOptionHTML.php.

◆ $lom_services

LOMServices ilLearningModuleExportOptionHTML::$lom_services
protected

Definition at line 35 of file class.ilLearningModuleExportOptionHTML.php.


The documentation for this class was generated from the following file: