19 declare(strict_types=1);
50 return 'mep_exp_option_xml_master';
60 $this->
lng->loadLanguageModule(
'exp');
61 return $this->
lng->txt(
"exp_format_dropdown-xml") .
" (" . $this->
lng->txt(
"mep_master_language_only") .
")";
65 ilExportHandlerConsumerContextInterface
$context,
66 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
68 foreach ($file_identifiers as $file_identifier) {
69 $file = explode(
":", trim($file_identifier->getIdentifier()));
71 $context->exportObject()->getId(),
73 $context->exportObject()->getType()
75 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
76 $file[1] = basename($file[1]);
78 $export_dir .
"/" . $file[1],
86 ilExportHandlerConsumerFileIdentifierInterface $file_identifier
88 $object_id = $reference_id->
toObjectId()->toInt();
90 $file = explode(
":", trim($file_identifier->getIdentifier()));
96 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
97 $file[1] = basename($file[1]);
99 $export_dir .
"/" . $file[1],
105 ilExportHandlerConsumerContextInterface
$context,
106 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
108 foreach ($file_identifiers as $file_identifier) {
109 $file = explode(
":", $file_identifier->getIdentifier());
110 $file[1] = basename($file[1]);
112 $context->exportObject()->getId(),
114 $context->exportObject()->getType()
116 $export_dir = substr($export_dir, 0, strlen($export_dir) - 1);
117 $exp_file = $export_dir .
"/" . str_replace(
"..",
"", $file[1]);
118 $exp_dir = $export_dir .
"/" . substr($file[1], 0, strlen($file[1]) - 4);
119 if (is_file($exp_file)) {
124 count(scandir($exp_dir)) === 2
132 ilExportHandlerConsumerContextInterface
$context 133 ): \
ILIAS\Export\ExportHandler\
I\Info\File\CollectionInterface {
134 $collection_builder = $context->fileCollectionBuilder();
136 $context->exportObject()->getId(),
138 $context->exportObject()->getType()
140 $dir = substr($dir, 0, strlen($dir) - 1);
142 $object_id =
new ObjectId($context->exportObject()->getId());
143 foreach ($file_infos as $file_name => $file_info) {
144 $collection_builder = $collection_builder->withSPLFileInfo(
145 new SplFileInfo($dir . DIRECTORY_SEPARATOR . $file_info[
"file"]),
150 return $collection_builder->collection();
156 $ot = (
new TranslationsRepository($this->db))->getFor($object_id->
toInt());
157 return $ot->getContentTranslationActivated();
161 ilExportHandlerConsumerContextInterface
$context 165 $context->exportObject()->exportXML($opt);
175 $h_dir = dir($directory);
176 while ($entry = $h_dir->read()) {
180 substr($entry, - 4) ===
".zip" 182 $ts = substr($entry, 0, strpos($entry,
"__"));
186 "size" => (
int) filesize($directory .
"/" . $entry),
187 "timestamp" => (
int) $ts
database()
Get interface to the Database.
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
language()
Get interface to the i18n service.
const CMD_LIST_EXPORT_FILES
static _lookupType(int $id, bool $reference=false)