19 declare(strict_types=1);
47 return 'mep_exp_option_xml_master';
57 $this->
lng->loadLanguageModule(
'exp');
58 return $this->
lng->txt(
"exp_format_dropdown-xml") .
" (" . $this->
lng->txt(
"mep_master_language_only") .
")";
62 ilExportHandlerConsumerContextInterface
$context,
63 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
65 foreach ($file_identifiers as $file_identifier) {
66 $file = explode(
":", trim($file_identifier->getIdentifier()));
68 $context->exportObject()->getId(),
70 $context->exportObject()->getType()
72 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
73 $file[1] = basename($file[1]);
75 $export_dir .
"/" . $file[1],
83 ilExportHandlerConsumerFileIdentifierInterface $file_identifier
85 $object_id = $reference_id->
toObjectId()->toInt();
87 $file = explode(
":", trim($file_identifier->getIdentifier()));
93 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
94 $file[1] = basename($file[1]);
96 $export_dir .
"/" . $file[1],
102 ilExportHandlerConsumerContextInterface
$context,
103 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
105 foreach ($file_identifiers as $file_identifier) {
106 $file = explode(
":", $file_identifier->getIdentifier());
107 $file[1] = basename($file[1]);
109 $context->exportObject()->getId(),
111 $context->exportObject()->getType()
113 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
114 $exp_file = $export_dir .
"/" . str_replace(
"..",
"", $file[1]);
115 $exp_dir = $export_dir .
"/" . substr($file[1], 0, strlen($file[1]) - 4);
116 if (is_file($exp_file)) {
121 count(scandir($exp_dir)) === 2
129 ilExportHandlerConsumerContextInterface
$context 130 ): \
ILIAS\Export\ExportHandler\
I\Info\File\CollectionInterface {
131 $collection_builder = $context->fileCollectionBuilder();
133 $context->exportObject()->getId(),
135 $context->exportObject()->getType()
137 $dir = substr($dir, 0, strlen($dir) - 1);
139 $object_id =
new ObjectId($context->exportObject()->getId());
140 foreach ($file_infos as $file_name => $file_info) {
141 $collection_builder = $collection_builder->withSPLFileInfo(
142 new SplFileInfo($dir . DIRECTORY_SEPARATOR . $file_info[
"file"]),
147 return $collection_builder->collection();
154 return $ot->getContentActivated();
158 ilExportHandlerConsumerContextInterface
$context 162 $context->exportObject()->exportXML($opt);
172 $h_dir = dir($directory);
173 while ($entry = $h_dir->read()) {
177 substr($entry, - 4) ===
".zip" 179 $ts = substr($entry, 0, strpos($entry,
"__"));
183 "size" => (
int) filesize($directory .
"/" . $entry),
184 "timestamp" => (
int) $ts
Interface Observer Contains several chained tasks and infos about them.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object
Customizing of pimple-DIC for ILIAS.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getInstance(int $obj_id)
language()
Get interface to the i18n service.
const CMD_LIST_EXPORT_FILES
static _lookupType(int $id, bool $reference=false)