ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilOrgUnitExportGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
27 {
29  protected ilLanguage $lng;
32  protected \ILIAS\UI\Factory $ui_factory;
33 
34  public function __construct(ilObjOrgUnitGUI $a_parent_gui, /*null|ilObject|ilObjOrgUnit*/ ?ilObject $a_main_obj = null)
35  {
36  parent::__construct($a_parent_gui, $a_main_obj);
37 
38  global $DIC;
39  $ilToolbar = $DIC->toolbar();
40  $lng = $DIC->language();
41  $ilCtrl = $DIC->ctrl();
42 
43  $this->toolbar = $DIC->toolbar();
44  $this->lng = $DIC->language();
45  $this->ctrl = $DIC->ctrl();
46  $this->ui_factory = $DIC['ui.factory'];
47 
48  $this->ilObjOrgUnit = $a_parent_gui->getObject();
49  }
50 
51  public function executeCommand(): void
52  {
53  $cmd = $this->ctrl->getCmd();
54  if (
55  $cmd === "simpleExport" ||
56  $cmd === "simpleExportExcel"
57  ) {
58  $this->$cmd();
59  return;
60  }
61  parent::executeCommand();
62  }
63 
64  public function listExportFiles(): void
65  {
66  if ($this->ilObjOrgUnit->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
67  parent::listExportFiles();
68  }
69  }
70 
71  public function simpleExport(): void
72  {
73  $ilOrgUnitExporter = new ilOrgUnitExporter();
74  $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
75  }
76 
77  public function simpleExportExcel(): void
78  {
79  $ilOrgUnitExporter = new ilOrgUnitExporter();
80  $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
81  }
82 }
Class ilOrgUnitExportGUI.
__construct(ilObjOrgUnitGUI $a_parent_gui, ?ilObject $a_main_obj=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
static getRootOrgRefId()
__construct(Container $dic, ilPlugin $plugin)