ILIAS  release_7 Revision v7.30-3-g800a261c036
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 */
3
12{
13
17 protected $toolbar;
21 protected $lng;
25 protected $ctrl;
29 protected $ilObjOrgUnit;
30
31
36 public 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()
58 {
60 parent::listExportFiles();
61 }
62 }
63
64
65 private function extendExportGUI()
66 {
67 $this->toolbar->addButton($this->lng->txt("simple_xml"), $this->ctrl->getLinkTarget($this, "simpleExport"));
68 $this->toolbar->addButton($this->lng->txt("simple_xls"), $this->ctrl->getLinkTarget($this, "simpleExportExcel"));
69 }
70
71
72 public function simpleExport()
73 {
74 $ilOrgUnitExporter = new ilOrgUnitExporter();
75 $ilOrgUnitExporter->sendAndCreateSimpleExportFile();
76 }
77
78
79 public function simpleExportExcel()
80 {
81 $ilOrgUnitExporter = new ilOrgUnitExporter();
82 $ilOrgUnitExporter->simpleExportExcel(ilObjOrgUnit::getRootOrgRefId());
83 }
84}
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 $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc