ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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 $ilCtrl, $lng, and $parent_gui.

38  {
39  global $lng, $ilCtrl;
40  $this->lng = $lng;
41  $this->ctrl = $ilCtrl;
42  $this->parent_gui = $parent_gui;
43  }
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ add()

ilObjBibliographicAdminLibrariesGUI::add ( )

add library

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

Referenced by executeCommand().

130  {
132  $this->parent_gui->tpl->setContent($form->getHTML());
133  $this->parent_gui->tabs_gui->setTabActive('settings');
134  }
Class ilBibliographicSetting.
+ Here is the caller graph for this function:

◆ cancel()

ilObjBibliographicAdminLibrariesGUI::cancel ( )

cancel

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

Referenced by executeCommand().

150  {
151  $this->ctrl->redirect($this, 'view');
152  }
+ Here is the caller graph for this function:

◆ create()

ilObjBibliographicAdminLibrariesGUI::create ( )

create library

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

References ilUtil\sendSuccess().

Referenced by executeCommand().

172  {
174  $form->setValuesByPost();
175  if ($form->saveObject()) {
176  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
177  $this->ctrl->redirect($this, 'view');
178  }
179  $this->parent_gui->tpl->setContent($form->getHTML());
180  }
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 140 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $_REQUEST, and $ilDB.

140  {
141  global $ilDB;
142  $ilDB->manipulate("DELETE FROM il_bibl_settings WHERE id = " . $ilDB->quote($_REQUEST["lib_id"], "integer"));
143  $this->ctrl->redirect($this, 'view');
144  }
global $ilDB
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

◆ edit()

ilObjBibliographicAdminLibrariesGUI::edit ( )

edit library

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

References $_REQUEST.

Referenced by executeCommand().

186  {
187  $this->ctrl->saveParameter($this, 'lib_id');
189  $this->parent_gui->tpl->setContent($form->getHTML());
190  }
Class ilBibliographicSetting.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjBibliographicAdminLibrariesGUI::executeCommand ( )

Execute command.

public

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

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

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

◆ initTable()

ilObjBibliographicAdminLibrariesGUI::initTable ( )
protected

Init Table with library entries.

protected

Returns
ilObjBibliographicAdminTableGUI

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

References $result, and ilBibliographicSetting\getAll().

Referenced by executeCommand().

109  {
110  $table = new ilObjBibliographicAdminTableGUI($this, 'library');
111  $settings = ilBibliographicSetting::getAll();
112  $result = array();
113  foreach ($settings as $set) {
114  $result[] = array(
115  "id" => $set->getId(),
116  "name" => $set->getName(),
117  "url" => $set->getUrl(),
118  "img" => $set->getImg()
119  );
120  }
121  $table->setData($result);
122 
123  return $table;
124  }
$result
Bibliographic ilObjBibliographicAdminTableGUI.
+ 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 158 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $_REQUEST, and ilUtil\sendSuccess().

Referenced by executeCommand().

158  {
160  $form->setValuesByPost();
161  if ($form->saveObject()) {
162  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
163  $this->ctrl->redirect($this, 'view');
164  }
165  $this->parent_gui->tpl->setContent($form->getHTML());
166  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilBibliographicSetting.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ 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: