ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 checkPermission ($a_perm)
 
 checkPermissionBool ($a_perm)
 

Protected Attributes

 $dic
 
 $parent_gui
 
 $ctrl
 
 $lng
 
 $rbacsystem
 
 $error
 

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 12 of file class.ilObjBibliographicAdminLibrariesGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicAdminLibrariesGUI::__construct (   $parent_gui)

Constructor.

Parameters
ilObjBibliographicAdminGUI$parent_gui

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

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

47  {
48  global $DIC;
49  $this->dic = $DIC;
50  $lng = $this->dic->language();
51  $ilCtrl = $this->dic->ctrl();
52  $this->lng = $lng;
53  $this->ctrl = $ilCtrl;
54  $this->parent_gui = $parent_gui;
55  $this->rbacsystem = $this->dic->rbac()->system();
56  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ add()

ilObjBibliographicAdminLibrariesGUI::add ( )

add library

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

References $form.

Referenced by executeCommand().

158  {
160  $this->parent_gui->tpl->setContent($form->getHTML());
161  $this->parent_gui->getTabsGui()->setTabActive('settings');
162  }
Class ilBibliographicSetting.
if(isset($_POST['submit'])) $form
+ Here is the caller graph for this function:

◆ cancel()

ilObjBibliographicAdminLibrariesGUI::cancel ( )

cancel

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

Referenced by executeCommand().

180  {
181  $this->ctrl->redirect($this, 'view');
182  }
+ Here is the caller graph for this function:

◆ checkPermission()

ilObjBibliographicAdminLibrariesGUI::checkPermission (   $a_perm)
protected

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

References checkPermissionBool().

Referenced by executeCommand().

230  {
231  if (!$this->checkPermissionBool($a_perm)) {
232  throw new ilObjectException($this->lng->txt("permission_denied"));
233  }
234  }
Base exception class for object service.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPermissionBool()

ilObjBibliographicAdminLibrariesGUI::checkPermissionBool (   $a_perm)
protected
Parameters
$a_perm
Returns
bool

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

References $DIC.

Referenced by checkPermission(), executeCommand(), and initTable().

243  {
244  global $DIC;
245 
246  return (bool) $DIC->access()->checkAccess($a_perm, '', $DIC->http()->request()->getQueryParams()['ref_id']);
247  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ create()

ilObjBibliographicAdminLibrariesGUI::create ( )

create library

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

References $form, and ilUtil\sendSuccess().

Referenced by executeCommand().

204  {
206  $form->setValuesByPost();
207  if ($form->saveObject()) {
208  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
209  $this->ctrl->redirect($this, 'view');
210  }
211  $this->parent_gui->tpl->setContent($form->getHTML());
212  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilBibliographicSetting.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilObjBibliographicAdminLibrariesGUI::delete ( )

delete library

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

169  {
170  $ilBibliographicSetting = new ilBibliographicSetting($_REQUEST["lib_id"]);
171  $ilBibliographicSetting->delete();
172  $this->ctrl->redirect($this, 'view');
173  }
Class ilBibliographicSetting.

◆ edit()

ilObjBibliographicAdminLibrariesGUI::edit ( )

edit library

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

References $form.

Referenced by executeCommand().

219  {
220  $this->ctrl->saveParameter($this, 'lib_id');
221  $form = new ilObjBibliographicAdminLibrariesFormGUI($this, new ilBibliographicSetting($_REQUEST["lib_id"]));
222  $this->parent_gui->tpl->setContent($form->getHTML());
223  }
Class ilBibliographicSetting.
if(isset($_POST['submit'])) $form
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjBibliographicAdminLibrariesGUI::executeCommand ( )

Execute command.

public

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

References $_GET, $DIC, add(), cancel(), checkPermission(), checkPermissionBool(), create(), edit(), ilLinkButton\getInstance(), initTable(), and update().

66  {
67  $cmd = $this->ctrl->getCmd();
68  if (!$this->rbacsystem->checkAccess("visible,read", $_GET['ref_id'])) {
69  $this->error->raiseError($this->lng->txt("no_permission"), $this->error->WARNING);
70  }
71  switch ($cmd) {
72  case 'view':
73  $this->view();
74  break;
75  case 'add':
76  $this->checkPermission('write');
77  $this->add();
78  break;
79  case 'edit':
80  $this->checkPermission('write');
81  $this->edit();
82  break;
83  case 'delete':
84  $this->checkPermission('write');
85  $this->delete();
86  break;
87  case 'create':
88  $this->checkPermission('write');
89  $this->create();
90  break;
91  case 'update':
92  $this->checkPermission('write');
93  $this->update();
94  break;
95  case 'cancel':
96  $this->cancel();
97  break;
98  }
99  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ initTable()

ilObjBibliographicAdminLibrariesGUI::initTable ( )
protected

Init Table with library entries.

protected

Returns
ilObjBibliographicAdminTableGUI

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

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

Referenced by executeCommand().

136  {
137  $table = new ilObjBibliographicAdminTableGUI($this, 'library', $this->checkPermissionBool('write'));
138  $settings = ilBibliographicSetting::getAll();
139  $result = array();
140  foreach ($settings as $set) {
141  $result[] = array(
142  "id" => $set->getId(),
143  "name" => $set->getName(),
144  "url" => $set->getUrl(),
145  "img" => $set->getImg(),
146  );
147  }
148  $table->setData($result);
149 
150  return $table;
151  }
$result
Bibliographic ilObjBibliographicAdminTableGUI.
Create styles array
The data for the language used.
if(empty($password)) $table
Definition: pwgen.php:24
+ 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 188 of file class.ilObjBibliographicAdminLibrariesGUI.php.

References $form, and ilUtil\sendSuccess().

Referenced by executeCommand().

189  {
190  $form = new ilObjBibliographicAdminLibrariesFormGUI($this, new ilBibliographicSetting($_REQUEST["lib_id"]));
191  $form->setValuesByPost();
192  if ($form->saveObject()) {
193  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
194  $this->ctrl->redirect($this, 'view');
195  }
196  $this->parent_gui->tpl->setContent($form->getHTML());
197  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilBibliographicSetting.
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilObjBibliographicAdminLibrariesGUI::$ctrl
protected

◆ $dic

ilObjBibliographicAdminLibrariesGUI::$dic
protected

◆ $error

ilObjBibliographicAdminLibrariesGUI::$error
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().

◆ $rbacsystem

ilObjBibliographicAdminLibrariesGUI::$rbacsystem
protected

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