ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilExport.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 use ILIAS\Export\ExportHandler\I\Consumer\ExportWriter\HandlerInterface as ilExportHandlerConsumerExportWriterInterface;
25 
30 class ilExport
31 {
32  public string $export_run_dir = '';
33  protected string $dir_relative = "";
34  protected string $dir_absolute = "";
35  protected ilLogger $log;
36  protected ilExportHandlerConsumerExportWriterInterface $export_writer;
37  protected ExportPathInfoInterface $export_path_info;
38  protected ExportConfigCollectionInterface $export_configs;
39  private static array $new_file_structure = array('cat',
40  'exc',
41  'crs',
42  'sess',
43  'file',
44  'grp',
45  'frm',
46  'usr',
47  'catr',
48  'crsr',
49  'grpr'
50  );
51  // @todo this should be part of module.xml and be parsed in the future
52  private static array $export_implementer = array("tst", "lm", "glo", "sahs");
53  private array $cnt = [];
55 
56  public function __construct()
57  {
58  global $DIC;
59  $this->log = $DIC->logger()->exp();
60  }
61 
62  public function setPathInfo(
63  ExportPathInfoInterface $export_path_info
64  ): void {
65  $this->export_path_info = $export_path_info;
66  }
67 
72  public function getExportDirInContainer(): string
73  {
74  return $this->export_path_info->getPathToComponentDirInContainer();
75  }
76 
82  public function getPathToComponentExpDirInContainer(): string
83  {
84  return $this->export_path_info->getPathToComponentExpDirInContainer();
85  }
86 
88  {
89  return "set_" . $this->export_path_info->getSetNumber() . DIRECTORY_SEPARATOR . $this->export_path_info->getPathToComponentExpDirInContainer();
90  }
91 
92  public function getSetNumber(): int
93  {
94  return $this->export_path_info->getSetNumber();
95  }
96 
97  public function isContainerExport(): bool
98  {
99  return $this->export_path_info->isContainerExport();
100  }
101 
102  public function setExportDirectories(
103  string $a_dir_relative,
104  string $a_dir_absolute
105  ): void {
106  $this->dir_relative = $a_dir_relative;
107  $this->dir_absolute = $a_dir_absolute;
108  }
109 
110  public function getRelativeExportDirectory(): string
111  {
112  return $this->dir_relative;
113  }
114 
115  public function getAbsoluteExportDirectory(): string
116  {
117  return $this->dir_absolute;
118  }
119 
120  public function setExportWriter(
121  ilExportHandlerConsumerExportWriterInterface $export_writer,
122  ): void {
123  $this->export_writer = $export_writer;
124  }
125 
126  public function getExportWriter(): ilExportHandlerConsumerExportWriterInterface
127  {
128  return $this->export_writer;
129  }
130 
131  public function setExportConfigs(
132  ExportConfigCollectionInterface $export_configs
133  ): void {
134  $this->export_configs = $export_configs;
135  }
136 
137  public function getExportConfigs(): ExportConfigCollectionInterface
138  {
139  return $this->export_configs;
140  }
141 
147  public static function _getValidExportSubItems(int $a_ref_id): array
148  {
149  global $DIC;
150 
151  $tree = $DIC->repositoryTree();
152 
153  $valid_items = array();
154  $sub_items = $tree->getSubTree($tree->getNodeData($a_ref_id));
155  foreach ($sub_items as $sub_item) {
156  if (in_array($sub_item["type"], self::$export_implementer)) {
157  $valid_items[] = [
158  "type" => (string) $sub_item["type"],
159  "title" => (string) $sub_item["title"],
160  "ref_id" => (int) $sub_item["child"],
161  "obj_id" => (int) $sub_item["obj_id"],
162  "timestamp" => ilExport::_getLastExportFileDate($sub_item["obj_id"], "xml", $sub_item["type"])
163  ];
164  }
165  }
166  return $valid_items;
167  }
168 
176  public static function _getLastExportFileDate(int $a_obj_id, string $a_type = "", string $a_obj_type = ""): int
177  {
178  $files = ilExport::_getExportFiles($a_obj_id, $a_type, $a_obj_type);
179  if (is_array($files)) {
180  $files = ilArrayUtil::sortArray($files, "timestamp", "desc");
181  return (int) $files[0]["timestamp"];
182  }
183  return 0;
184  }
185 
194  public static function _getLastExportFileInformation(
195  int $a_obj_id,
196  string $a_type = "",
197  string $a_obj_type = ""
198  ): ?array {
199  $files = ilExport::_getExportFiles($a_obj_id, $a_type, $a_obj_type);
200  if (is_array($files)) {
201  $files = ilArrayUtil::sortArray($files, "timestamp", "desc");
202  return $files[0];
203  }
204  return null;
205  }
206 
216  public static function _getExportDirectory(
217  int $a_obj_id,
218  string $a_type = "xml",
219  string $a_obj_type = "",
220  string $a_entity = ""
221  ): string {
222  global $DIC;
223 
224  $logger = $DIC->logger()->exp();
225  $objDefinition = $DIC['objDefinition'];
226 
227  $ent = ($a_entity == "")
228  ? ""
229  : "_" . $a_entity;
230 
231  if ($a_obj_type == "") {
232  $a_obj_type = ilObject::_lookupType($a_obj_id);
233  }
234 
235  if (in_array($a_obj_type, self::$new_file_structure)) {
236  $dir = ilFileUtils::getDataDir() . DIRECTORY_SEPARATOR;
237  $dir .= 'il' . $objDefinition->getClassName($a_obj_type) . $ent . DIRECTORY_SEPARATOR;
238  $dir .= self::createPathFromId($a_obj_id, $a_obj_type) . DIRECTORY_SEPARATOR;
239  $dir .= ($a_type == 'xml' ? 'export' : 'export_' . $a_type);
240  return $dir;
241  }
242 
243  $exporter_class = ilImportExportFactory::getExporterClass($a_obj_type);
244  $export_dir = call_user_func(
245  array($exporter_class, 'lookupExportDirectory'),
246  $a_obj_type,
247  $a_obj_id,
248  $a_type,
249  $a_entity
250  );
251 
252  $logger->debug('Export dir is ' . $export_dir);
253  return $export_dir;
254  }
255 
263  public static function _getExportFiles(int $a_obj_id, $a_export_types = "", string $a_obj_type = ""): array
264  {
265  if ($a_obj_type == "") {
266  $a_obj_type = ilObject::_lookupType($a_obj_id);
267  }
268 
269  if ($a_export_types == "") {
270  $a_export_types = array("xml");
271  }
272  if (!is_array($a_export_types)) {
273  $a_export_types = array($a_export_types);
274  }
275 
276  // initialize array
277  $file = array();
278 
279  $types = $a_export_types;
280 
281  foreach ($types as $type) {
282  $dir = ilExport::_getExportDirectory($a_obj_id, $type, $a_obj_type);
283 
284  // quit if import dir not available
285  if (!is_dir($dir) || !is_writable($dir)) {
286  continue;
287  }
288 
289  // open directory
290  $h_dir = dir($dir);
291 
292  // get files and save the in the array
293  while ($entry = $h_dir->read()) {
294  if ($entry !== "." &&
295  $entry !== ".." &&
296  substr($entry, -4) === ".zip" &&
297  preg_match("/^[0-9]{10}_{2}[0-9]+_{2}(" . $a_obj_type . "_)*[0-9]+\.zip\$/", $entry)) {
298  $ts = substr($entry, 0, strpos($entry, "__"));
299  $file[$entry . $type] = [
300  "type" => (string) $type,
301  "file" => (string) $entry,
302  "size" => (int) filesize($dir . "/" . $entry),
303  "timestamp" => (int) $ts
304  ];
305  }
306  }
307 
308  // close import directory
309  $h_dir->close();
310  }
311 
312  // sort files
313  ksort($file);
314  reset($file);
315  return $file;
316  }
317 
318  public static function _createExportDirectory(
319  int $a_obj_id,
320  string $a_export_type = "xml",
321  string $a_obj_type = ""
322  ): bool {
323  global $DIC;
324 
325  $ilErr = $DIC['ilErr'];
326 
327  if ($a_obj_type == "") {
328  $a_obj_type = ilObject::_lookupType($a_obj_id);
329  }
330 
331  $edir = ilExport::_getExportDirectory($a_obj_id, $a_export_type, $a_obj_type);
333  return true;
334  }
335 
341  public static function _generateIndexFile(
342  string $a_filename,
343  int $a_obj_id,
344  array $a_files,
345  string $a_type = ""
346  ): void {
347  global $DIC;
348 
349  $lng = $DIC->language();
350  $lng->loadLanguageModule("export");
351 
352  if ($a_type == "") {
353  $a_type = ilObject::_lookupType($a_obj_id);
354  }
355  $a_tpl = new ilGlobalTemplate("tpl.main.html", true, true);
356  $location_stylesheet = ilUtil::getStyleSheetLocation();
357  $a_tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
358  $a_tpl->loadStandardTemplate();
359  $a_tpl->setTitle(ilObject::_lookupTitle($a_obj_id));
360  $a_tpl->setDescription($lng->txt("export_export_date") . ": " .
361  date('Y-m-d H:i:s', time()) . " (" . date_default_timezone_get() . ")");
362  $f_tpl = new ilTemplate("tpl.export_list.html", true, true, "components/ILIAS/Export");
363  foreach ($a_files as $file) {
364  $f_tpl->setCurrentBlock("file_row");
365  $f_tpl->setVariable("TITLE", $file["title"]);
366  $f_tpl->setVariable("TYPE", $lng->txt("obj_" . $file["type"]));
367  $f_tpl->setVariable("FILE", $file["file"]);
368  $f_tpl->parseCurrentBlock();
369  }
370  $a_tpl->setContent($f_tpl->get());
371  $index_content = $a_tpl->getSpecial("DEFAULT", false, false, false, true, false, false);
372 
373  $f = fopen($a_filename, "w");
374  fwrite($f, $index_content);
375  fclose($f);
376  }
377 
378  /***
379  * - Walk through sequence
380  * - Each step in sequence creates one xml file,
381  * e.g. Services/Mediapool/set_1.xml
382  * - manifest.xml lists all files
383  * <manifest>
384  * <xmlfile path="components/ILIAS/Mediapool/set_1.xml"/>
385  * ...
386  * </manifest
387  */
388 
397  public function exportObject(
398  string $a_type,
399  int $a_id,
400  string $a_target_release = ""
401  ): array {
402  $this->log->debug("export type: $a_type, id: $a_id, target_release: " . $a_target_release);
403 
404  // if no target release specified, use latest major release number
405  if ($a_target_release == "") {
406  $v = explode(".", ILIAS_VERSION_NUMERIC);
407  $a_target_release = $v[0] . "." . $v[1] . ".0";
408  $this->log->debug("target_release set to: " . $a_target_release);
409  }
410 
411  // manifest writer
412  $this->manifest_writer = new ilXmlWriter();
413  $this->manifest_writer->xmlHeader();
414  $this->manifest_writer->xmlStartTag(
415  'Manifest',
416  array(
417  "MainEntity" => $a_type,
418  "Title" => ilObject::_lookupTitle($a_id),
419  /* "TargetRelease" => $a_target_release, */
420  "InstallationId" => IL_INST_ID,
421  "InstallationUrl" => ILIAS_HTTP_PATH
422  )
423  );
424 
425  // get export class
426  ilExport::_createExportDirectory($a_id, "xml", $a_type);
427  $export_dir = ilExport::_getExportDirectory($a_id, "xml", $a_type);
428  $ts = time();
429 
430  // Workaround for test assessment
431  $sub_dir = $ts . '__' . IL_INST_ID . '__' . $a_type . '_' . $a_id;
432  $new_file = $sub_dir . '.zip';
433 
434  $this->export_run_dir = $export_dir . "/" . $sub_dir;
435  ilFileUtils::makeDirParents($this->export_run_dir);
436  $this->log->debug("export dir: " . $this->export_run_dir);
437 
438  $this->cnt = array();
439 
440  $class = ilImportExportFactory::getExporterClass($a_type);
441  $comp = ilImportExportFactory::getComponentForExport($a_type);
442 
443  $success = $this->processExporter($comp, $class, $a_type, $a_target_release, [$a_id]);
444 
445  $this->manifest_writer->xmlEndTag('Manifest');
446  $this->manifest_writer->xmlDumpFile($this->export_run_dir . "/manifest.xml", false);
447 
448  // zip the file
449  $this->log->debug("zip: " . $export_dir . "/" . $new_file);
450  $this->log->debug("run dir: " . $this->export_run_dir);
451  ilFileUtils::zip($this->export_run_dir, $export_dir . "/" . $new_file);
452  ilFileUtils::delDir($this->export_run_dir);
453 
454  // Store info about export
455  if ($success) {
456  $exp = new ilExportFileInfo($a_id);
457  $exp->setVersion($a_target_release);
458  $exp->setCreationDate(new ilDateTime($ts, IL_CAL_UNIX));
459  $exp->setExportType('xml');
460  $exp->setFilename($new_file);
461  $exp->create();
462  }
463 
464  return array(
465  "success" => $success,
466  "file" => $new_file,
467  "directory" => $export_dir
468  );
469  }
470 
480  public function exportEntity(
481  string $a_entity,
482  string $a_id,
483  string $a_target_release,
484  string $a_component,
485  string $a_title,
486  string $a_export_dir,
487  string $a_type_for_file = ""
488  ): array {
489  global $DIC;
490 
491  $objDefinition = $DIC['objDefinition'];
492  $tpl = $DIC['tpl'];
493 
494  // if no target release specified, use latest major release number
495  if ($a_target_release == "") {
496  $v = explode(".", ILIAS_VERSION_NUMERIC);
497  $a_target_release = $v[0] . "." . $v[1] . ".0";
498  }
499 
500  if ($a_type_for_file == "") {
501  $a_type_for_file = $a_entity;
502  }
503 
504  $comp = $a_component;
505  $c = explode("/", $comp);
506  $component = str_replace("_", "", $c[2]);
507  $class = "il" . $component . "Exporter";
508 
509  // manifest writer
510  $this->manifest_writer = new ilXmlWriter();
511  $this->manifest_writer->xmlHeader();
512  $this->manifest_writer->xmlStartTag(
513  'Manifest',
514  array(
515  "MainEntity" => $a_entity,
516  "Title" => $a_title,
517  /* "TargetRelease" => $a_target_release, */
518  "InstallationId" => IL_INST_ID,
519  "InstallationUrl" => ILIAS_HTTP_PATH
520  )
521  );
522 
523  $export_dir = $a_export_dir;
524  $ts = time();
525 
526  // determine file name and subdirectory
527  $sub_dir = $ts . '__' . IL_INST_ID . '__' . $a_type_for_file . '_' . $a_id;
528  $new_file = $sub_dir . '.zip';
529 
530  $this->export_run_dir = $export_dir . "/" . $sub_dir;
531  ilFileUtils::makeDirParents($this->export_run_dir);
532 
533  $this->cnt = array();
534  $success = $this->processExporter($comp, $class, $a_entity, $a_target_release, [$a_id]);
535  $this->manifest_writer->xmlEndTag('Manifest');
536  $this->manifest_writer->xmlDumpFile($this->export_run_dir . "/manifest.xml", false);
537 
538  // zip the file
539  ilFileUtils::zip($this->export_run_dir, $export_dir . "/" . $new_file);
540  ilFileUtils::delDir($this->export_run_dir);
541 
542  return array(
543  "success" => $success,
544  "file" => $new_file,
545  "directory" => $export_dir
546  );
547  }
548 
560  public function processExporter(
561  string $a_comp,
562  string $a_class,
563  string $a_entity,
564  string $a_target_release,
565  ?array $a_id = null
566  ): bool {
567  $success = true;
568  $this->log->debug("process exporter, comp: " . $a_comp . ", class: " . $a_class . ", entity: " . $a_entity .
569  ", target release " . $a_target_release . ", id: " . print_r($a_id, true));
570 
571  if (!is_array($a_id)) {
572  if ($a_id == "") {
573  return true;
574  }
575  $a_id = array($a_id);
576  }
577 
578  // get exporter object
579  if (!class_exists($a_class)) {
580  $a_class = substr($a_class, 0, 2) . "ILIAS" . substr($a_class, 2);
581  if (!class_exists($a_class)) {
582  $export_class_file = "./" . $a_comp . "/classes/class." . $a_class . ".php";
583  if (!is_file($export_class_file)) {
584  throw new ilExportException('Export class file "' . $export_class_file . '" not found.');
585  }
586  }
587  }
588 
589  $exp = new $a_class();
590  $exp->setExport($this);
591  if (!isset($this->cnt[$a_comp])) {
592  $this->cnt[$a_comp] = 1;
593  } else {
594  $this->cnt[$a_comp]++;
595  }
596  $set_dir_relative = $a_comp . "/set_" . $this->cnt[$a_comp];
597  $set_dir_absolute = $this->export_run_dir . "/" . $set_dir_relative;
598  ilFileUtils::makeDirParents($set_dir_absolute);
599  $this->log->debug("dir: " . $set_dir_absolute);
600 
601  $this->log->debug("init exporter");
602  $exp->init();
603 
604  // process head dependencies
605  $this->log->debug("process head dependencies for " . $a_entity);
606  $sequence = $exp->getXmlExportHeadDependencies($a_entity, $a_target_release, $a_id);
607  foreach ($sequence as $s) {
608  $comp = explode("/", $s["component"]);
609  $component = str_replace("_", "", $comp[2]);
610  $exp_class = "il" . $component . "Exporter";
611  $s = $this->processExporter(
612  $s["component"],
613  $exp_class,
614  $s["entity"],
615  $a_target_release,
616  $s["ids"]
617  );
618  if (!$s) {
619  $success = false;
620  }
621  }
622 
623  // write export.xml file
624  $export_writer = new ilXmlWriter();
625  $export_writer->xmlHeader();
626 
627  $sv = $exp->determineSchemaVersion($a_entity, $a_target_release);
628  $sv["uses_dataset"] ??= false;
629  $sv['xsd_file'] ??= '';
630  $this->log->debug("schema version for entity: $a_entity, target release: $a_target_release");
631  $this->log->debug("...is: " . $sv["schema_version"] . ", namespace: " . $sv["namespace"] .
632  ", xsd file: " . $sv["xsd_file"] . ", uses_dataset: " . ((int) $sv["uses_dataset"]));
633 
634  $attribs = array("InstallationId" => IL_INST_ID,
635  "InstallationUrl" => ILIAS_HTTP_PATH,
636  "Entity" => $a_entity,
637  "SchemaVersion" => $sv["schema_version"],
638  /* "TargetRelease" => $a_target_release, */
639  "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
640  "xmlns:exp" => "http://www.ilias.de/Services/Export/exp/4_1",
641  "xsi:schemaLocation" => "http://www.ilias.de/Services/Export/exp/4_1 " . ILIAS_HTTP_PATH . "/components/ILIAS/Export/xml/ilias_export_4_1.xsd"
642  );
643  if ($sv["namespace"] != "" && $sv["xsd_file"] != "") {
644  $attribs["xsi:schemaLocation"] .= " " . $sv["namespace"] . " " .
645  ILIAS_HTTP_PATH . "/components/ILIAS/Export/xml/" . $sv["xsd_file"];
646  $attribs["xmlns"] = $sv["namespace"];
647  }
648  if ($sv["uses_dataset"]) {
649  $attribs["xsi:schemaLocation"] .= " " .
650  "http://www.ilias.de/Services/DataSet/ds/4_3 " . ILIAS_HTTP_PATH . "/components/ILIAS/Export/xml/ilias_ds_4_3.xsd";
651  $attribs["xmlns:ds"] = "http://www.ilias.de/Services/DataSet/ds/4_3";
652  }
653  $export_writer->xmlStartTag('exp:Export', $attribs);
654 
655  $dir_cnt = 1;
656  foreach ($a_id as $id) {
657  $exp->setExportDirectories(
658  $set_dir_relative . "/expDir_" . $dir_cnt,
659  $set_dir_absolute . "/expDir_" . $dir_cnt
660  );
661  $export_writer->xmlStartTag('exp:ExportItem', array("Id" => $id));
662  $xml = $exp->getXmlRepresentation($a_entity, $sv["schema_version"], (string) $id);
663  $export_writer->appendXML($xml);
664  $export_writer->xmlEndTag('exp:ExportItem');
665  $dir_cnt++;
666  }
667 
668  $export_writer->xmlEndTag('exp:Export');
669  $export_writer->xmlDumpFile($set_dir_absolute . "/export.xml", false);
670 
671  $this->manifest_writer->xmlElement(
672  "ExportFile",
673  array("Component" => $a_comp, "Path" => $set_dir_relative . "/export.xml")
674  );
675 
676  // process tail dependencies
677  $this->log->debug("process tail dependencies of " . $a_entity);
678  $sequence = $exp->getXmlExportTailDependencies($a_entity, $a_target_release, $a_id);
679  foreach ($sequence as $s) {
680  if (empty((array) ($s["ids"] ?? []))) {
681  continue;
682  }
683 
684  $comp = explode("/", $s["component"]);
685  $component = str_replace("_", "", $comp[2]);
686  $exp_class = "il" . $component . "Exporter";
687  $s = $this->processExporter(
688  $s["component"],
689  $exp_class,
690  $s["entity"],
691  $a_target_release,
692  (array) $s["ids"]
693  );
694  if (!$s) {
695  $success = false;
696  }
697  }
698 
699  $this->log->debug("returning " . ((int) $success) . " for " . $a_entity);
700  return $success;
701  }
702 
703  protected static function createPathFromId(int $a_container_id, string $a_name): string
704  {
705  $max_exponent = 3;
706  $factor = 100;
707 
708  $path = [];
709  $found = false;
710  $num = $a_container_id;
711  $path_string = '';
712  for ($i = $max_exponent; $i > 0; $i--) {
713  $factor = pow($factor, $i);
714  if (($tmp = (int) ($num / $factor)) or $found) {
715  $path[] = $tmp;
716  $num = $num % $factor;
717  $found = true;
718  }
719  }
720  if (count($path)) {
721  $path_string = (implode('/', $path) . '/');
722  }
723  return $path_string . $a_name . '_' . $a_container_id;
724  }
725 }
ilExportHandlerConsumerExportWriterInterface $export_writer
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
string $dir_absolute
static _getLastExportFileDate(int $a_obj_id, string $a_type="", string $a_obj_type="")
Get date of last export file
getPathToComponentExpDirInContainer()
const IL_INST_ID
Definition: constants.php:40
special template class to simplify handling of ITX/PEAR
ExportConfigCollectionInterface $export_configs
static array $new_file_structure
exportEntity(string $a_entity, string $a_id, string $a_target_release, string $a_component, string $a_title, string $a_export_dir, string $a_type_for_file="")
Export an ILIAS entity
processExporter(string $a_comp, string $a_class, string $a_entity, string $a_target_release, ?array $a_id=null)
Process exporter
string $dir_relative
setPathInfo(ExportPathInfoInterface $export_path_info)
const IL_CAL_UNIX
$c
Definition: deliver.php:25
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
getExportDirInContainer()
getPathToComponentExpDirInContainerWithLeadingSetNumber()
$ilErr
Definition: raiseError.php:33
static _getValidExportSubItems(int $a_ref_id)
Get a list of subitems of a repository resource, that implement the export.
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ILIAS_VERSION_NUMERIC
static _lookupTitle(int $obj_id)
static _generateIndexFile(string $a_filename, int $a_obj_id, array $a_files, string $a_type="")
Generates an index.html file including links to all xml files included (for container exports) ...
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
ExportPathInfoInterface $export_path_info
string $export_run_dir
static _getExportFiles(int $a_obj_id, $a_export_types="", string $a_obj_type="")
global $DIC
Definition: shib_login.php:26
ilXmlWriter $manifest_writer
Stores information of creation date and versions of export files
getAbsoluteExportDirectory()
getRelativeExportDirectory()
setExportConfigs(ExportConfigCollectionInterface $export_configs)
exportObject(string $a_type, int $a_id, string $a_target_release="")
Export an ILIAS object (the object type must be known by objDefinition)
static getDataDir()
get data directory (outside webspace)
setExportWriter(ilExportHandlerConsumerExportWriterInterface $export_writer,)
static _getLastExportFileInformation(int $a_obj_id, string $a_type="", string $a_obj_type="")
Get last export file information
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static array $export_implementer
static createPathFromId(int $a_container_id, string $a_name)
global $lng
Definition: privfeed.php:31
static zip(string $a_dir, string $a_file, bool $compress_content=false)
ilLogger $log
static _lookupType(int $id, bool $reference=false)
setExportDirectories(string $a_dir_relative, string $a_dir_absolute)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)