ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilOrgUnitExportGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
11 {
15  protected $toolbar;
19  protected $lng;
23  protected $ctrl;
27  protected $ilObjOrgUnit;
28 
29 
34  public function __construct(ilObjOrgUnitGUI $a_parent_gui, $a_main_obj = null)
35  {
36  global $DIC;
37  $ilToolbar = $DIC['ilToolbar'];
38  $lng = $DIC['lng'];
39  $ilCtrl = $DIC['ilCtrl'];
40 
41  parent::__construct($a_parent_gui, $a_main_obj);
42 
43  $this->toolbar = $ilToolbar;
44  $this->lng = $lng;
45  $this->ctrl = $ilCtrl;
46  $this->ilObjOrgUnit = $a_parent_gui->object;
47 
49  //Simple XML and Simple XLS Export should only be available in the root orgunit folder as it always exports the whole tree
50  $this->extendExportGUI();
51  }
52  }
53 
54 
55  public function listExportFiles()
56  {
58  parent::listExportFiles();
59  }
60  }
61 
62 
63  private function extendExportGUI()
64  {
65  $this->toolbar->addButton($this->lng->txt("simple_xml"), $this->ctrl->getLinkTarget($this, "simpleExport"));
66  $this->toolbar->addButton($this->lng->txt("simple_xls"), $this->ctrl->getLinkTarget($this, "simpleExportExcel"));
67  }
68 
69 
70  public function simpleExport()
71  {
72  $ilOrgUnitExporter = new ilOrgUnitExporter();
73  $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
74  }
75 
76 
77  public function simpleExportExcel()
78  {
79  $ilOrgUnitExporter = new ilOrgUnitExporter();
80  $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
81  }
82 }
Class ilOrgUnitExporter.
global $DIC
Definition: saml.php:7
Class ilObjOrgUnit GUI class.
Class ilOrgUnitExportGUI.
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
Class ilObjOrgUnit.
static getRootOrgRefId()
getRefId()
get reference id public
__construct(ilObjOrgUnitGUI $a_parent_gui, $a_main_obj=null)