ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 */
3require_once("./Services/Export/classes/class.ilExportGUI.php");
4require_once("./Modules/OrgUnit/classes/class.ilObjOrgUnit.php");
5require_once("class.ilOrgUnitExporter.php");
17 protected $toolbar;
21 protected $lng;
25 protected $ctrl;
29 protected $ilObjOrgUnit;
30
31
36 function __construct(ilObjOrgUnitGUI $a_parent_gui, $a_main_obj = null)
37 {
38 global $ilToolbar, $lng, $ilCtrl;
39
40 parent::__construct($a_parent_gui, $a_main_obj);
41
42 $this->toolbar = $ilToolbar;
43 $this->lng = $lng;
44 $this->ctrl = $ilCtrl;
45 $this->ilObjOrgUnit = $a_parent_gui->object;
46
48 //Simple XML and Simple XLS Export should only be available in the root orgunit folder as it always exports the whole tree
49 $this->extendExportGUI();
50 }
51 }
52
53
54 public function listExportFiles() {
56 parent::listExportFiles();
57 }
58 }
59
60
61 private function extendExportGUI() {
62 $this->toolbar->addButton($this->lng->txt("simple_xml"), $this->ctrl->getLinkTarget($this, "simpleExport"));
63 $this->toolbar->addButton($this->lng->txt("simple_xls"), $this->ctrl->getLinkTarget($this, "simpleExportExcel"));
64 }
65
66
67 public function simpleExport() {
68 $ilOrgUnitExporter = new ilOrgUnitExporter();
69 $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
70 }
71
72
73 public function simpleExportExcel() {
74 $ilOrgUnitExporter = new ilOrgUnitExporter();
75 $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
76 }
77
78}
79?>
Export User Interface Class.
Class ilObjOrgUnit GUI class.
Class ilObjOrgUnit.
static getRootOrgRefId()
getRefId()
get reference id @access public
Class ilOrgUnitExportGUI.
listExportFiles()
List export files.
__construct(ilObjOrgUnitGUI $a_parent_gui, $a_main_obj=null)
Class ilOrgUnitExporter.
global $ilCtrl
Definition: ilias.php:18