ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjBibliographicAdminLibrariesGUI Class Reference

Bibliographic Administration Settings. More...

+ Collaboration diagram for ilObjBibliographicAdminLibrariesGUI:

Public Member Functions

 __construct ($parent_gui)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 add ()
 add library More...
 
 delete ()
 delete library More...
 
 cancel ()
 cancel More...
 
 update ()
 save changes in library More...
 
 create ()
 create library More...
 
 edit ()
 edit library More...
 

Protected Member Functions

 initTable ()
 Init Table with library entries. More...
 

Protected Attributes

 $parent_gui
 
 $ctrl
 
 $lng
 

Detailed Description

Bibliographic Administration Settings.

Author
Theodor Truffer tt@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Martin Studer ms@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 17 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicAdminLibrariesGUI::__construct (   $parent_gui)

Constructor.

Parameters
ilObjBibliographicAdminGUI$parent_gui

Definition at line 38 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $DIC, $ilCtrl, $lng, and $parent_gui.

38  {
39  global $DIC;
40  $lng = $DIC['lng'];
41  $ilCtrl = $DIC['ilCtrl'];
42  $this->lng = $lng;
43  $this->ctrl = $ilCtrl;
44  $this->parent_gui = $parent_gui;
45  }
global $ilCtrl
Definition: ilias.php:18
global $DIC

Member Function Documentation

◆ add()

ilObjBibliographicAdminLibrariesGUI::add ( )

add library

Definition at line 134 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Referenced by executeCommand().

134  {
136  $this->parent_gui->tpl->setContent($form->getHTML());
137  $this->parent_gui->getTabsGui()->setTabActive('settings');
138  }
Class ilBibliographicSetting.
+ Here is the caller graph for this function:

◆ cancel()

ilObjBibliographicAdminLibrariesGUI::cancel ( )

cancel

Definition at line 154 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Referenced by executeCommand().

154  {
155  $this->ctrl->redirect($this, 'view');
156  }
+ Here is the caller graph for this function:

◆ create()

ilObjBibliographicAdminLibrariesGUI::create ( )

create library

Definition at line 176 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References ilUtil\sendSuccess().

Referenced by executeCommand().

176  {
178  $form->setValuesByPost();
179  if ($form->saveObject()) {
180  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
181  $this->ctrl->redirect($this, 'view');
182  }
183  $this->parent_gui->tpl->setContent($form->getHTML());
184  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilBibliographicSetting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilObjBibliographicAdminLibrariesGUI::delete ( )

delete library

Definition at line 144 of file class.ilObjBibliographicAdminLibrariesGUI.php.

144  {
145  $ilBibliographicSetting = new ilBibliographicSetting($_REQUEST["lib_id"]);
146  $ilBibliographicSetting->delete();
147  $this->ctrl->redirect($this, 'view');
148  }
Class ilBibliographicSetting.

◆ edit()

ilObjBibliographicAdminLibrariesGUI::edit ( )

edit library

Definition at line 190 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Referenced by executeCommand().

190  {
191  $this->ctrl->saveParameter($this, 'lib_id');
192  $form = new ilObjBibliographicAdminLibrariesFormGUI($this, new ilBibliographicSetting($_REQUEST["lib_id"]));
193  $this->parent_gui->tpl->setContent($form->getHTML());
194  }
Class ilBibliographicSetting.
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjBibliographicAdminLibrariesGUI::executeCommand ( )

Execute command.

public

Definition at line 54 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $cmd, $DIC, $ilCtrl, add(), cancel(), create(), edit(), ilLinkButton\getInstance(), initTable(), and update().

54  {
55  global $DIC;
56  $ilCtrl = $DIC['ilCtrl'];
57  $cmd = $ilCtrl->getCmd();
58  switch ($cmd) {
59  case 'view':
60  $this->view();
61  break;
62  case 'add':
63  $this->add();
64  break;
65  case 'edit':
66  $this->edit();
67  break;
68  case 'delete':
69  $this->delete();
70  break;
71  case 'create':
72  $this->create();
73  break;
74  case 'update':
75  $this->update();
76  break;
77  case 'cancel':
78  $this->cancel();
79  break;
80  }
81  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
global $DIC
+ Here is the call graph for this function:

◆ initTable()

ilObjBibliographicAdminLibrariesGUI::initTable ( )
protected

Init Table with library entries.

protected

Returns
ilObjBibliographicAdminTableGUI

Definition at line 113 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $result, array, and ilBibliographicSetting\getAll().

Referenced by executeCommand().

113  {
114  $table = new ilObjBibliographicAdminTableGUI($this, 'library');
115  $settings = ilBibliographicSetting::getAll();
116  $result = array();
117  foreach ($settings as $set) {
118  $result[] = array(
119  "id" => $set->getId(),
120  "name" => $set->getName(),
121  "url" => $set->getUrl(),
122  "img" => $set->getImg()
123  );
124  }
125  $table->setData($result);
126 
127  return $table;
128  }
$result
Bibliographic ilObjBibliographicAdminTableGUI.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilObjBibliographicAdminLibrariesGUI::update ( )

save changes in library

Definition at line 162 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References ilUtil\sendSuccess().

Referenced by executeCommand().

162  {
163  $form = new ilObjBibliographicAdminLibrariesFormGUI($this, new ilBibliographicSetting($_REQUEST["lib_id"]));
164  $form->setValuesByPost();
165  if ($form->saveObject()) {
166  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
167  $this->ctrl->redirect($this, 'view');
168  }
169  $this->parent_gui->tpl->setContent($form->getHTML());
170  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilBibliographicSetting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilObjBibliographicAdminLibrariesGUI::$ctrl
protected

◆ $lng

ilObjBibliographicAdminLibrariesGUI::$lng
protected

Definition at line 30 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Referenced by __construct().

◆ $parent_gui

ilObjBibliographicAdminLibrariesGUI::$parent_gui
protected

Definition at line 22 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: