ILIAS  release_8 Revision v8.24
class.ilOrgUnitExportGUI.php
Go to the documentation of this file.
1<?php
18/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
19
26{
28 protected ilLanguage $lng;
31
32 public function __construct(ilObjOrgUnitGUI $a_parent_gui, /*null|ilObject|ilObjOrgUnit*/ ?ilObject $a_main_obj = null)
33 {
34 global $DIC;
35 $ilToolbar = $DIC->toolbar();
36 $lng = $DIC->language();
37 $ilCtrl = $DIC->ctrl();
38
39 parent::__construct($a_parent_gui, $a_main_obj);
40
41 $this->toolbar = $ilToolbar;
42 $this->lng = $lng;
43 $this->ctrl = $ilCtrl;
44 $this->ilObjOrgUnit = $a_parent_gui->getObject();
45
47 //Simple XML and Simple XLS Export should only be available in the root orgunit folder as it always exports the whole tree
48 $this->extendExportGUI();
49 }
50 }
51
52 public function listExportFiles(): void
53 {
55 parent::listExportFiles();
56 }
57 }
58
59 private function extendExportGUI(): void
60 {
61 $this->toolbar->addButton($this->lng->txt("simple_xml"), $this->ctrl->getLinkTarget($this, "simpleExport"));
62 $this->toolbar->addButton(
63 $this->lng->txt("simple_xls"),
64 $this->ctrl->getLinkTarget($this, "simpleExportExcel")
65 );
66 }
67
68 public function simpleExport(): void
69 {
70 $ilOrgUnitExporter = new ilOrgUnitExporter();
71 $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
72 }
73
74 public function simpleExportExcel(): void
75 {
76 $ilOrgUnitExporter = new ilOrgUnitExporter();
77 $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
78 }
79}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
Class ilObjOrgUnit GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getRootOrgRefId()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjOrgUnitGUI $a_parent_gui, ?ilObject $a_main_obj=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc