ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $DIC;
39 $ilToolbar = $DIC['ilToolbar'];
40 $lng = $DIC['lng'];
41 $ilCtrl = $DIC['ilCtrl'];
42
43 parent::__construct($a_parent_gui, $a_main_obj);
44
45 $this->toolbar = $ilToolbar;
46 $this->lng = $lng;
47 $this->ctrl = $ilCtrl;
48 $this->ilObjOrgUnit = $a_parent_gui->object;
49
51 //Simple XML and Simple XLS Export should only be available in the root orgunit folder as it always exports the whole tree
52 $this->extendExportGUI();
53 }
54 }
55
56
57 public function listExportFiles() {
59 parent::listExportFiles();
60 }
61 }
62
63
64 private function extendExportGUI() {
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 $ilOrgUnitExporter = new ilOrgUnitExporter();
72 $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
73 }
74
75
76 public function simpleExportExcel() {
77 $ilOrgUnitExporter = new ilOrgUnitExporter();
78 $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
79 }
80
81}
82?>
An exception for terminatinating execution or to throw for unit testing.
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
global $DIC