19 declare(strict_types=1);
    45         $this->archives = $DIC->legacyArchives();
    51     public function exportObject(
string $a_type, 
int $a_id, 
string $a_target_release = 
""): array
    56         if ($a_target_release == 
"") {
    58             $a_target_release = $v[0] . 
"." . $v[1] . 
".0";
    65         $sub_dir = $ts . 
"__" . 
IL_INST_ID . 
"__" . $a_type . 
"_" . $a_id;
    67         $this->cont_export_dir = $export_dir . DIRECTORY_SEPARATOR . $sub_dir;
    70         $log->
debug(
'Using base directory: ' . $this->export_run_dir);
    74         $this->
addSubitems($a_id, $a_type, $a_target_release);
    85         $this->cont_manifest_writer->xmlHeader();
    86         $this->cont_manifest_writer->xmlStartTag(
    89                 "MainEntity" => $a_type,
    93                 "InstallationUrl" => ILIAS_HTTP_PATH
   102     protected function addSubitems(
int $a_id, 
string $a_type, 
string $a_target_release): void
   105         foreach ($this->eo->getSubitemsForExport() as 
$ref_id) {
   117             $exp_full = $exp_dir . DIRECTORY_SEPARATOR . $expi->getFilename();
   119             $this->log->debug(
'Zip path ' . $exp_full);
   122             $this->archives->unzip(
   130             $new_path_rel = 
'set_' . $set_number . DIRECTORY_SEPARATOR . $expi->getBasename();
   131             $new_path_abs = $this->cont_export_dir . DIRECTORY_SEPARATOR . $new_path_rel;
   133             $this->log->debug($new_path_rel . 
' ' . $new_path_abs);
   137                 $exp_dir . DIRECTORY_SEPARATOR . $expi->getBasename(),
   141             $this->log->debug($exp_dir . DIRECTORY_SEPARATOR . $expi->getBasename() . 
' -> ' . $new_path_abs);
   144             if ($a_id == $obj_id) {
   146                 if (file_exists($exp_full)) {
   147                     $this->log->info(
'Deleting' . $exp_full);
   152             $this->cont_manifest_writer->xmlElement(
   155                     'Path' => $new_path_rel,
   165         $this->cont_manifest_writer->xmlEndTag(
'Manifest');
   166         $this->log->debug($this->cont_export_dir . DIRECTORY_SEPARATOR . 
'manifest.xml');
   167         $this->cont_manifest_writer->xmlDumpFile($this->cont_export_dir . DIRECTORY_SEPARATOR . 
'manifest.xml', 
true);
 exportObject(string $a_type, int $a_id, string $a_target_release="")
 
__construct(ilExportOptions $eo)
Constructor. 
 
const ILIAS_VERSION_NUMERIC
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static lookupLastExport(int $a_obj_id, string $a_type, string $a_version='')
Lookup last export. 
 
manifestWriterEnd(string $a_type, int $a_id, string $a_target_release)
 
static makeDirParents(string $a_dir)
Create a new directory and all parent directories. 
 
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object. 
 
ilXmlWriter $cont_manifest_writer
 
static _lookupObjId(int $ref_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupTitle(int $obj_id)
 
manifestWriterBegin(string $a_type, int $a_id, string $a_target_release)
 
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
 
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
addSubitems(int $a_id, string $a_type, string $a_target_release)
 
static zip(string $a_dir, string $a_file, bool $compress_content=false)
 
debug(string $message, array $context=[])
 
static _lookupType(int $id, bool $reference=false)