ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjBibliographicGUI Class Reference

Class ilObjBibliographicGUI. More...

+ Inheritance diagram for ilObjBibliographicGUI:
+ Collaboration diagram for ilObjBibliographicGUI:

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 getStandardCmd ()
 getStandardCmd More...
 
 getType ()
 getType More...
 
 executeCommand ()
 executeCommand More...
 
 infoScreen ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreenForward ()
 show information screen More...
 
 addLocatorItems ()
 
 save ()
 
 editObject ()
 edit object More...
 
 initEditForm ()
 
 getEditFormCustomValues (array &$a_values)
 
 render ()
 
 showContent ()
 shows the overview page with all entries in a table More...
 
 sendFile ()
 provide file as a download More...
 
 showDetails ()
 
 view ()
 
 updateCustom (ilPropertyFormGUI $a_form)
 updateSettings More...
 
 toggleNotification ()
 
 addNews ($obj_id, $change='created')
 
 addToDesk ()
 Add desktop item. More...
 
 removeFromDesk ()
 Remove from desktop. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

Static Public Member Functions

static _goto ($a_target)
 _goto Deep link More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

const P_ENTRY_ID = 'entry_id'
 
const CMD_SHOW_CONTENT = 'showContent'
 
const CMD_SEND_FILE = "sendFile"
 
const TAB_CONTENT = "content"
 
const SUB_TAB_FILTER = "filter"
 
const CMD_VIEW = "view"
 
const TAB_EXPORT = "export"
 
const TAB_SETTINGS = self::SUBTAB_SETTINGS
 
const TAB_ID_RECORDS = "id_records"
 
const TAB_ID_PERMISSIONS = "id_permissions"
 
const TAB_ID_INFO = "id_info"
 
const CMD_SHOW_DETAILS = "showDetails"
 
const CMD_EDIT = "edit"
 
const SUBTAB_SETTINGS = "settings"
 
const CMD_EDIT_OBJECT = 'editObject'
 
const CMD_UPDATE_OBJECT = 'updateObject'
 
 $object
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreationForms ($a_new_type)
 
 initSubTabs ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 applyFilter ()
 
 resetFilter ()
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $facade
 
 $translation_factory
 
 $field_factory
 
 $filter_factory
 
 $type_factory
 
 $cmd = self::CMD_SHOW_CONTENT
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Private Member Functions

 handleNonAccess ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)
Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Definition at line 75 of file class.ilObjBibliographicGUI.php.

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

76  {
77  global $DIC;
78 
79  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
80  $DIC->language()->loadLanguageModule('bibl');
81  $DIC->language()->loadLanguageModule('content');
82  $DIC->language()->loadLanguageModule('obj');
83  $DIC->language()->loadLanguageModule('cntr');
84 
85  if (is_object($this->object)) {
86  $this->facade = new ilBiblFactoryFacade($this->object);
87  }
88  }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
Class ilBiblFactoryFacade.
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjBibliographicGUI::_goto (   $a_target)
static

_goto Deep link

Parameters
string$a_target

Definition at line 252 of file class.ilObjBibliographicGUI.php.

References $DIC, and P_ENTRY_ID.

253  {
254  global $DIC;
255 
256  $id = explode("_", $a_target);
257  $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class);
258  $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class, "ref_id", $id[0]);
259  // Detail-View
260  if ($id[1]) {
261  $DIC->ctrl()
262  ->setParameterByClass(ilObjBibliographicGUI::class, ilObjBibliographicGUI::P_ENTRY_ID, $id[1]);
263  $DIC->ctrl()->redirectByClass(
264  array(
265  ilRepositoryGUI::class,
266  ilObjBibliographicGUI::class,
267  ),
268  self::CMD_SHOW_DETAILS
269  );
270  } else {
271  $DIC->ctrl()->redirectByClass(
272  array(
273  ilRepositoryGUI::class,
274  ilObjBibliographicGUI::class,
275  ),
276  self::CMD_VIEW
277  );
278  }
279  }
global $DIC
Definition: goto.php:24

◆ addLocatorItems()

ilObjBibliographicGUI::addLocatorItems ( )

Definition at line 236 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilObject2GUI\$node_id.

237  {
238  global $DIC;
239  $ilLocator = $DIC['ilLocator'];
240  if (is_object($this->object)) {
241  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
242  }
243  }
global $DIC
Definition: goto.php:24

◆ addNews()

ilObjBibliographicGUI::addNews (   $obj_id,
  $change = 'created' 
)
Parameters
string$change

Definition at line 672 of file class.ilObjBibliographicGUI.php.

References $DIC, ilObjectGUI\$obj_id, getType(), NEWS_NOTICE, and NEWS_USERS.

Referenced by save(), and updateCustom().

673  {
674  global $DIC;
675 
676  $ilNewsItem = new ilNewsItem();
677  $ilNewsItem->setTitle($DIC->language()->txt('news_title_' . $change));
678  $ilNewsItem->setPriority(NEWS_NOTICE);
679  $ilNewsItem->setContext($obj_id, $this->getType());
680  $ilNewsItem->setUserId($DIC->user()->getId());
681  $ilNewsItem->setVisibility(NEWS_USERS);
682  $ilNewsItem->setContentTextIsLangVar(false);
683  $ilNewsItem->create();
684  }
const NEWS_NOTICE
global $DIC
Definition: goto.php:24
const NEWS_USERS
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToDesk()

ilObjBibliographicGUI::addToDesk ( )

Add desktop item.

Alias for addToDeskObject.

public

Definition at line 693 of file class.ilObjBibliographicGUI.php.

References ilDesktopItemHandling\addToDeskObject().

694  {
695  $this->addToDeskObject();
696  }
addToDeskObject()
Add desktop item public.
+ Here is the call graph for this function:

◆ applyFilter()

ilObjBibliographicGUI::applyFilter ( )
protected

Definition at line 554 of file class.ilObjBibliographicGUI.php.

555  {
556  $table = new ilBiblEntryTableGUI($this, $this->facade);
557  $table->writeFilterToSession();
558  $table->resetOffset();
559  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
560  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ editObject()

ilObjBibliographicGUI::editObject ( )

edit object

public

Definition at line 422 of file class.ilObjBibliographicGUI.php.

References ilObjectGUI\$ilErr, ilObjectGUI\$tabs_gui, ilObjectGUI\$tpl, ilObjectGUI\addExternalEditFormCustom(), ilObject2GUI\checkPermissionBool(), ilObjectGUI\getEditFormValues(), and initEditForm().

423  {
424  $tpl = $this->tpl;
425  $ilTabs = $this->tabs_gui;
427 
428  if (!$this->checkPermissionBool("write")) {
429  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
430  }
431 
432  $ilTabs->activateTab("settings");
433 
434  $form = $this->initEditForm();
435  $values = $this->getEditFormValues();
436  if ($values) {
437  $form->setValuesByArray($values, true);
438  }
439 
440  $this->addExternalEditFormCustom($form);
441 
442  $tpl->setContent($form->getHTML());
443  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
getEditFormValues()
Get values for edit form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjBibliographicGUI::executeCommand ( )

executeCommand

Definition at line 118 of file class.ilObjBibliographicGUI.php.

References $cmd, $DIC, ilObjectGUI\addHeaderAction(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getStandardCmd(), handleNonAccess(), infoScreenForward(), initSubTabs(), and ilObject2GUI\prepareOutput().

119  {
120  global $DIC;
121  $ilNavigationHistory = $DIC['ilNavigationHistory'];
122 
123  // Navigation History
124  $link = $this->dic()->ctrl()->getLinkTarget($this, $this->getStandardCmd());
125  if ($this->object != null) {
126  $ilNavigationHistory->addItem($this->object->getRefId(), $link, "bibl");
127  $this->addHeaderAction();
128  }
129 
130  // general Access Check, especially for single entries not matching the object
131  if ($this->object instanceof ilObjBibliographic && !$DIC->access()->checkAccess('read', "", $this->object->getRefId())) {
132  $this->handleNonAccess();
133  }
134 
135  $next_class = $this->dic()->ctrl()->getNextClass($this);
136  $this->cmd = $this->dic()->ctrl()->getCmd();
137  switch ($next_class) {
138  case strtolower(ilInfoScreenGUI::class):
139  $this->prepareOutput();
140  $this->dic()->tabs()->activateTab(self::TAB_ID_INFO);
141  $this->infoScreenForward();
142  break;
143  case strtolower(ilCommonActionDispatcherGUI::class):
144  $this->prepareOutput();
146  $this->ctrl->forwardCommand($gui);
147  break;
148  case strtolower(ilPermissionGUI::class):
149  $this->prepareOutput();
150  $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
151  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
152  break;
153  case strtolower(ilObjectCopyGUI::class):
154  $cp = new ilObjectCopyGUI($this);
155  $cp->setType('bibl');
156  $this->dic()['tpl']->loadStandardTemplate();
157  $this->ctrl->forwardCommand($cp);
158  break;
159  case strtolower(ilObjFileGUI::class):
160  $this->prepareOutput();
161  $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
162  $this->ctrl->forwardCommand(new ilObjFile($this));
163  break;
164  case strtolower(ilExportGUI::class):
165  $this->prepareOutput();
166  $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
167  $exp_gui = new ilExportGUI($this);
168  $exp_gui->addFormat("xml");
169  $this->ctrl->forwardCommand($exp_gui);
170  break;
171  case strtolower(ilBiblFieldFilterGUI::class):
172  $this->prepareOutput();
173  $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
174  $this->initSubTabs();
175  $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
176  $this->ctrl->forwardCommand(new ilBiblFieldFilterGUI($this->facade));
177  break;
178  default:
179  $this->prepareOutput();
180  $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
181  switch ($cmd) {
182  case 'edit':
183  case 'update':
184  case self::CMD_EDIT_OBJECT:
185  case self::CMD_UPDATE_OBJECT:
186  $this->initSubTabs();
187  $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
188  $this->{$cmd}();
189  break;
190  default:
191  $this->{$cmd}();
192  break;
193  }
194  break;
195  }
196 
197  return true;
198  }
infoScreenForward()
show information screen
GUI class for the workflow of copying objects.
Export User Interface Class.
Class ilBiblFieldFilterGUI.
global $DIC
Definition: goto.php:24
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjBibliographic.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setType($type)
Sets $type.
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjBibliographicGUI::getEditFormCustomValues ( array &  $a_values)
Parameters
array$a_values
Returns
array

Definition at line 498 of file class.ilObjBibliographicGUI.php.

499  {
500  $a_values["is_online"] = $this->object->getOnline();
501 
502  return $a_values;
503  }

◆ getStandardCmd()

ilObjBibliographicGUI::getStandardCmd ( )

getStandardCmd

Returns
String

Definition at line 96 of file class.ilObjBibliographicGUI.php.

Referenced by executeCommand().

97  {
98  return self::CMD_VIEW;
99  }
+ Here is the caller graph for this function:

◆ getType()

ilObjBibliographicGUI::getType ( )

getType

Returns
String
Deprecated:
REFACTOR use type factory via Facade

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

Referenced by addNews(), and save().

110  {
111  return "bibl";
112  }
+ Here is the caller graph for this function:

◆ handleNonAccess()

ilObjBibliographicGUI::handleNonAccess ( )
private

Definition at line 724 of file class.ilObjBibliographicGUI.php.

References $_GET, $DIC, ilObjectGUI\_gotoRepositoryRoot(), and ilUtil\sendFailure().

Referenced by executeCommand(), sendFile(), showContent(), showDetails(), and updateCustom().

725  {
726  global $DIC;
727 
728  unset($_GET);
729  ilUtil::sendFailure($DIC->language()->txt("no_permission"), true);
731  }
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjBibliographicGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 206 of file class.ilObjBibliographicGUI.php.

References infoScreenForward().

207  {
208  $this->ctrl->setCmd("showSummary");
209  $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
210  $this->infoScreenForward();
211  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjBibliographicGUI::infoScreenForward ( )

show information screen

Definition at line 217 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilUtil\sendFailure().

Referenced by executeCommand(), and infoScreen().

218  {
219  global $DIC;
220 
221  if (!$this->checkPermissionBoolAndReturn("visible") && !$this->checkPermissionBoolAndReturn('read')) {
222  ilUtil::sendFailure($DIC['lng']->txt("msg_no_perm_read"), true);
223  $this->ctrl->redirectByClass('ilDashboardGUI', '');
224  }
225  $DIC->tabs()->activateTab(self::TAB_ID_INFO);
226  $info = new ilInfoScreenGUI($this);
227  $info->enablePrivateNotes();
228  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
229  $this->ctrl->forwardCommand($info);
230  }
Class ilInfoScreenGUI.
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjBibliographicGUI::initCreationForms (   $a_new_type)
protected
Parameters
string$a_new_type
Returns
array

Definition at line 287 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilFileInputGUI\setSuffixes().

Referenced by save().

288  {
289  global $DIC;
290 
291  $forms = parent::initCreationForms($a_new_type);
292  // Add File-Upload
293  $in_file = new ilFileInputGUI($DIC->language()->txt("bibliography_file"), "bibliographic_file");
294  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
295  $in_file->setRequired(true);
296  $forms[self::CFORM_NEW]->addItem($in_file);
297  $this->ctrl->saveParameterByClass('ilobjrootfoldergui', 'new_type');
298  $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass('ilobjrootfoldergui', "save"));
299 
300  return $forms;
301  }
This class represents a file property in a property form.
global $DIC
Definition: goto.php:24
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjBibliographicGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected
Parameters
ilPropertyFormGUI$a_form

Definition at line 482 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilPropertyFormGUI\addItem().

483  {
484  global $DIC;
485 
486  $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
487  // is_online
488  $cb = new ilCheckboxInputGUI($DIC->language()->txt("online"), "is_online");
489  $a_form->addItem($cb);
490  }
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ initEditForm()

ilObjBibliographicGUI::initEditForm ( )

Definition at line 446 of file class.ilObjBibliographicGUI.php.

References $DIC, ilSubEnabledFormPropertyGUI\addSubItem(), and ilFileInputGUI\setSuffixes().

Referenced by editObject().

447  {
448  global $DIC;
449 
450  $form = parent::initEditForm();
451  // Add File-Upload
452  $in_file = new ilFileInputGUI(
453  $DIC->language()
454  ->txt("bibliography_file"),
455  "bibliographic_file"
456  );
457  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
458  $in_file->setRequired(false);
459  $cb_override = new ilCheckboxInputGUI(
460  $DIC->language()
461  ->txt("override_entries"),
462  "override_entries"
463  );
464  $cb_override->addSubItem($in_file);
465 
466  $form->addItem($cb_override);
467 
468  $section_appearance = new ilFormSectionHeaderGUI();
469  $section_appearance->setTitle($this->lng->txt('cont_presentation'));
470  $form->addItem($section_appearance);
471  $DIC->object()->commonSettings()->legacyForm($form, $this->object)->addTileImage();
472 
473  $form->setFormAction($DIC->ctrl()->getFormAction($this, "save"));
474 
475  return $form;
476  }
This class represents a section header in a property form.
This class represents a file property in a property form.
This class represents a checkbox property in a property form.
global $DIC
Definition: goto.php:24
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSubTabs()

ilObjBibliographicGUI::initSubTabs ( )
protected

Definition at line 399 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilBiblFieldFilterGUI\CMD_STANDARD.

Referenced by executeCommand().

400  {
401  global $DIC;
402  $DIC->tabs()->addSubTab(
403  self::SUBTAB_SETTINGS,
404  $DIC->language()
405  ->txt(self::SUBTAB_SETTINGS),
406  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
407  );
408  $DIC->tabs()->addSubTab(
409  self::SUB_TAB_FILTER,
410  $DIC->language()
411  ->txt("bibl_filter"),
412  $this->ctrl->getLinkTargetByClass(ilBiblFieldFilterGUI::class, ilBiblFieldFilterGUI::CMD_STANDARD)
413  );
414  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ removeFromDesk()

ilObjBibliographicGUI::removeFromDesk ( )

Remove from desktop.

Alias for removeFromDeskObject.

public

Definition at line 704 of file class.ilObjBibliographicGUI.php.

References ilObjectGUI\afterImport(), and ilDesktopItemHandling\removeFromDeskObject().

705  {
706  $this->removeFromDeskObject();
707  }
removeFromDeskObject()
Remove from desktop public.
+ Here is the call graph for this function:

◆ render()

ilObjBibliographicGUI::render ( )

Definition at line 506 of file class.ilObjBibliographicGUI.php.

References showContent().

507  {
508  $this->showContent();
509  }
showContent()
shows the overview page with all entries in a table
+ Here is the call graph for this function:

◆ resetFilter()

ilObjBibliographicGUI::resetFilter ( )
protected

Definition at line 563 of file class.ilObjBibliographicGUI.php.

564  {
565  $table = new ilBiblEntryTableGUI($this, $this->facade);
566  $table->resetFilter();
567  $table->resetOffset();
568  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
569  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ save()

ilObjBibliographicGUI::save ( )

Definition at line 304 of file class.ilObjBibliographicGUI.php.

References $DIC, addNews(), ilObjectGUI\afterSave(), ilObject\getId(), getType(), initCreationForms(), and ilObject2GUI\setTabs().

305  {
306  global $DIC;
307 
308  $form = $this->initCreationForms($this->getType());
309  if ($form[self::CFORM_NEW]->checkInput()) {
310  parent::save();
311  } else {
312  $form = $form[self::CFORM_NEW];
313  $form->setValuesByPost();
314  $DIC->ui()->mainTemplate()->setContent($form->getHtml());
315  }
316  }
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ sendFile()

ilObjBibliographicGUI::sendFile ( )

provide file as a download

Definition at line 575 of file class.ilObjBibliographicGUI.php.

References $DIC, ilFileDelivery\deliverFileAttached(), handleNonAccess(), ilUtil\sendFailure(), and showContent().

576  {
577  global $DIC;
578 
579  if ($DIC['ilAccess']->checkAccess('read', "", $this->object->getRefId())) {
580  $file_path = $this->object->getLegacyAbsolutePath();
581  if ($file_path) {
582  if (is_file($file_path)) {
583  ilFileDelivery::deliverFileAttached($file_path, $this->object->getFilename(), 'application/octet-stream');
584  } else {
585  ilUtil::sendFailure($DIC['lng']->txt("file_not_found"));
586  $this->showContent();
587  }
588  }
589  } else {
590  $this->handleNonAccess();
591  }
592  }
static deliverFileAttached($path_to_file, $download_file_name='', $mime_type='', $delete_file=false)
void
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
showContent()
shows the overview page with all entries in a table
+ Here is the call graph for this function:

◆ showContent()

ilObjBibliographicGUI::showContent ( )

shows the overview page with all entries in a table

Definition at line 515 of file class.ilObjBibliographicGUI.php.

References $_GET, Vendor\Package\$b, $DIC, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilLinkButton\getInstance(), handleNonAccess(), and ilUtil\sendFailure().

Referenced by render(), sendFile(), and view().

516  {
517  global $DIC;
518 
519  // if user has read permission and object is online OR user has write permissions
520  $read_access = $DIC->access()->checkAccess('read', "", $this->object->getRefId());
521  $online = $this->object->getOnline();
522  $write_access = $DIC->access()->checkAccess('write', "", $this->object->getRefId());
523  if (($read_access && $online) || $write_access) {
524  $DIC->tabs()->activateTab(self::TAB_CONTENT);
525 
527  $b->setCaption('download_original_file');
528  $b->setUrl($DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
529  $b->setPrimary(true);
530  $DIC->toolbar()->addButtonInstance($b);
531 
532  $table = new ilBiblEntryTableGUI($this, $this->facade);
533  $html = $table->getHTML();
534  $DIC->ui()->mainTemplate()->setContent($html);
535 
536  //Permanent Link
537  $DIC->ui()->mainTemplate()->setPermanentLink("bibl", $this->object->getRefId());
538  } else {
539  $object_title = ilObject::_lookupTitle(ilObject::_lookupObjId($_GET["ref_id"]));
541  sprintf(
542  $DIC->language()
543  ->txt("msg_no_perm_read_item"),
544  $object_title
545  ),
546  true
547  );
548  //redirect to repository without any parameters
549  $this->handleNonAccess();
550  }
551  }
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDetails()

ilObjBibliographicGUI::showDetails ( )

Definition at line 595 of file class.ilObjBibliographicGUI.php.

References $DIC, and handleNonAccess().

596  {
597  global $DIC;
598 
599  if ($DIC->access()->checkAccess('read', "", $this->object->getRefId())) {
600  $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
601  $entry = $this->facade->entryFactory()
602  ->findByIdAndTypeString($id, $this->object->getFileTypeAsString());
603  $bibGUI = new ilBiblEntryDetailPresentationGUI($entry, $this->facade);
604 
605  $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
606  } else {
607  $this->handleNonAccess();
608  }
609  }
global $DIC
Definition: goto.php:24
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ toggleNotification()

ilObjBibliographicGUI::toggleNotification ( )

Definition at line 641 of file class.ilObjBibliographicGUI.php.

References $_GET, $DIC, ilObjectGUI\$obj_id, ilNotification\setNotification(), and ilNotification\TYPE_DATA_COLLECTION.

642  {
643  global $DIC;
644 
645  switch ($_GET["ntf"]) {
646  case 1:
649  $DIC->user()
650  ->getId(),
652  false
653  );
654  break;
655  case 2:
658  $DIC->user()
659  ->getId(),
661  true
662  );
663  break;
664  }
665  $DIC->ctrl()->redirect($this, "");
666  }
$_GET["client_id"]
global $DIC
Definition: goto.php:24
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
+ Here is the call graph for this function:

◆ updateCustom()

ilObjBibliographicGUI::updateCustom ( ilPropertyFormGUI  $a_form)

updateSettings

Definition at line 621 of file class.ilObjBibliographicGUI.php.

References $DIC, addNews(), ilPropertyFormGUI\getInput(), and handleNonAccess().

622  {
623  global $DIC;
624 
625  if ($DIC->access()->checkAccess('write', "", $this->object->getRefId())) {
626  if ($this->object->getOnline() != $a_form->getInput("is_online")) {
627  $this->object->setOnline($a_form->getInput("is_online"));
628  }
629 
630  if (!empty($_FILES['bibliographic_file']['name'])) {
631  $this->addNews($this->object->getId(), 'updated');
632  }
633 
634  $DIC->object()->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
635  } else {
636  $this->handleNonAccess();
637  }
638  }
global $DIC
Definition: goto.php:24
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
addNews($obj_id, $change='created')
+ Here is the call graph for this function:

◆ view()

ilObjBibliographicGUI::view ( )

Definition at line 612 of file class.ilObjBibliographicGUI.php.

References showContent().

613  {
614  $this->showContent();
615  }
showContent()
shows the overview page with all entries in a table
+ Here is the call graph for this function:

Field Documentation

◆ $cmd

ilObjBibliographicGUI::$cmd = self::CMD_SHOW_CONTENT
protected

Definition at line 67 of file class.ilObjBibliographicGUI.php.

Referenced by executeCommand().

◆ $facade

ilObjBibliographicGUI::$facade
protected

Definition at line 47 of file class.ilObjBibliographicGUI.php.

◆ $field_factory

ilObjBibliographicGUI::$field_factory
protected

Definition at line 55 of file class.ilObjBibliographicGUI.php.

◆ $filter_factory

ilObjBibliographicGUI::$filter_factory
protected

Definition at line 59 of file class.ilObjBibliographicGUI.php.

◆ $object

ilObjBibliographicGUI::$object

Definition at line 43 of file class.ilObjBibliographicGUI.php.

◆ $translation_factory

ilObjBibliographicGUI::$translation_factory
protected

Definition at line 51 of file class.ilObjBibliographicGUI.php.

◆ $type_factory

ilObjBibliographicGUI::$type_factory
protected

Definition at line 63 of file class.ilObjBibliographicGUI.php.

◆ CMD_EDIT

const ilObjBibliographicGUI::CMD_EDIT = "edit"

Definition at line 36 of file class.ilObjBibliographicGUI.php.

◆ CMD_EDIT_OBJECT

const ilObjBibliographicGUI::CMD_EDIT_OBJECT = 'editObject'

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

◆ CMD_SEND_FILE

const ilObjBibliographicGUI::CMD_SEND_FILE = "sendFile"

Definition at line 26 of file class.ilObjBibliographicGUI.php.

◆ CMD_SHOW_CONTENT

const ilObjBibliographicGUI::CMD_SHOW_CONTENT = 'showContent'

◆ CMD_SHOW_DETAILS

const ilObjBibliographicGUI::CMD_SHOW_DETAILS = "showDetails"

Definition at line 35 of file class.ilObjBibliographicGUI.php.

◆ CMD_UPDATE_OBJECT

const ilObjBibliographicGUI::CMD_UPDATE_OBJECT = 'updateObject'

Definition at line 39 of file class.ilObjBibliographicGUI.php.

◆ CMD_VIEW

const ilObjBibliographicGUI::CMD_VIEW = "view"

Definition at line 29 of file class.ilObjBibliographicGUI.php.

◆ P_ENTRY_ID

const ilObjBibliographicGUI::P_ENTRY_ID = 'entry_id'

◆ SUB_TAB_FILTER

const ilObjBibliographicGUI::SUB_TAB_FILTER = "filter"

Definition at line 28 of file class.ilObjBibliographicGUI.php.

◆ SUBTAB_SETTINGS

const ilObjBibliographicGUI::SUBTAB_SETTINGS = "settings"

Definition at line 37 of file class.ilObjBibliographicGUI.php.

◆ TAB_CONTENT

const ilObjBibliographicGUI::TAB_CONTENT = "content"

Definition at line 27 of file class.ilObjBibliographicGUI.php.

◆ TAB_EXPORT

const ilObjBibliographicGUI::TAB_EXPORT = "export"

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

◆ TAB_ID_INFO

const ilObjBibliographicGUI::TAB_ID_INFO = "id_info"

Definition at line 34 of file class.ilObjBibliographicGUI.php.

◆ TAB_ID_PERMISSIONS

const ilObjBibliographicGUI::TAB_ID_PERMISSIONS = "id_permissions"

Definition at line 33 of file class.ilObjBibliographicGUI.php.

◆ TAB_ID_RECORDS

const ilObjBibliographicGUI::TAB_ID_RECORDS = "id_records"

Definition at line 32 of file class.ilObjBibliographicGUI.php.

◆ TAB_SETTINGS

const ilObjBibliographicGUI::TAB_SETTINGS = self::SUBTAB_SETTINGS

Definition at line 31 of file class.ilObjBibliographicGUI.php.

Referenced by ilBiblFieldFilterGUI\executeCommand().


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