ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjBibliographicGUI Class Reference

Class ilObjBibliographicGUI. More...

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

Public Member Functions

 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...
 
 addLocatorItems ()
 
 save ()
 
 editObject ()
 edit object public More...
 
 initEditForm ()
 
 getEditFormCustomValues (array &$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 (int $obj_id, string $change='created')
 
 addToDesk ()
 Add desktop item. More...
 
 removeFromDesk ()
 Remove from desktop. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. 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 (string $a_target)
 _goto Deep link More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

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'
 
ilObject $object = null
 
- 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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreationForms (string $a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilBiblFactoryFacade $facade = null
 
ilBiblTranslationFactory $translation_factory
 
ilBiblFieldFactory $field_factory
 
ilBiblFieldFilterFactory $filter_factory
 
ilBiblTypeFactory $type_factory
 
 $storage
 
ilObjBibliographicStakeholder $stakeholder
 
string $cmd = self::CMD_SHOW_CONTENT
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 handleNonAccess ()
 

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjBibliographicGUI::_goto ( string  $a_target)
static

_goto Deep link

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

References $DIC, ilObjectGUI\$id, and P_ENTRY_ID.

245  : void
246  {
247  global $DIC;
248 
249  $id = explode("_", $a_target);
250  $DIC->ctrl()->setTargetScript('ilias.php');
251  $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class, "ref_id", (int) ($id[0] ?? 1));
252  // Detail-View
253  if (isset($id[1]) && $id[1] !== '') {
254  $DIC->ctrl()
255  ->setParameterByClass(ilObjBibliographicGUI::class, ilObjBibliographicGUI::P_ENTRY_ID, $id[1]);
256  $DIC->ctrl()->redirectByClass(
257  array(
258  ilRepositoryGUI::class,
259  ilObjBibliographicGUI::class,
260  ),
261  self::CMD_SHOW_DETAILS
262  );
263  } else {
264  $DIC->ctrl()->redirectByClass(
265  array(
266  ilRepositoryGUI::class,
267  ilObjBibliographicGUI::class,
268  ),
269  self::CMD_VIEW
270  );
271  }
272  }
global $DIC
Definition: feed.php:28

◆ addLocatorItems()

ilObjBibliographicGUI::addLocatorItems ( )

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

References $DIC, ilObject2GUI\$node_id, ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

232  : void
233  {
234  global $DIC;
235  $ilLocator = $DIC['ilLocator'];
236  if (is_object($this->object)) {
237  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
238  }
239  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ addNews()

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

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

References $DIC, getType(), NEWS_NOTICE, and NEWS_USERS.

Referenced by afterSave(), and updateCustom().

630  : void
631  {
632  global $DIC;
633 
634  $ilNewsItem = new ilNewsItem();
635  $ilNewsItem->setTitle($DIC->language()->txt('news_title_' . $change));
636  $ilNewsItem->setPriority(NEWS_NOTICE);
637  $ilNewsItem->setContext($obj_id, $this->getType());
638  $ilNewsItem->setUserId($DIC->user()->getId());
639  $ilNewsItem->setVisibility(NEWS_USERS);
640  $ilNewsItem->setContentTextIsLangVar(false);
641  $ilNewsItem->create();
642  }
global $DIC
Definition: feed.php:28
const NEWS_NOTICE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A news item can be created by different sources.
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 648 of file class.ilObjBibliographicGUI.php.

References ilDesktopItemHandling\addToDeskObject().

648  : void
649  {
650  $this->addToDeskObject();
651  }
addToDeskObject()
Add desktop item public.
+ Here is the call graph for this function:

◆ afterSave()

ilObjBibliographicGUI::afterSave ( ilObject  $a_new_object)
protected

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

References $DIC, addNews(), ILIAS\Repository\ctrl(), ilObject\getId(), ILIAS\Repository\object(), and ilObject2GUI\setTabs().

307  : void
308  {
309  $this->addNews($a_new_object->getId(), 'created');
310  $this->ctrl->redirect($this, self::CMD_EDIT);
311  }
addNews(int $obj_id, string $change='created')
+ Here is the call graph for this function:

◆ applyFilter()

ilObjBibliographicGUI::applyFilter ( )
protected

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

References ILIAS\Repository\ctrl().

510  : void
511  {
512  $table = new ilBiblEntryTableGUI($this, $this->facade);
513  $table->writeFilterToSession();
514  $table->resetOffset();
515  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
516  }
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:

◆ editObject()

ilObjBibliographicGUI::editObject ( )

edit object public

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

References ilObject2GUI\$error, $ilErr, ilObject2GUI\$tabs_gui, ilObject2GUI\$tpl, ilObjectGUI\addExternalEditFormCustom(), ilObject2GUI\checkPermissionBool(), ilObjectGUI\getEditFormValues(), initEditForm(), ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setContent().

397  : void
398  {
399  $tpl = $this->tpl;
400  $ilTabs = $this->tabs_gui;
402 
403  if (!$this->checkPermissionBool("write")) {
404  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
405  }
406 
407  $ilTabs->activateTab("settings");
408 
409  $form = $this->initEditForm();
410  $values = $this->getEditFormValues();
411  if ($values !== []) {
412  $form->setValuesByArray($values, true);
413  }
414 
415  $this->addExternalEditFormCustom($form);
416 
417  $tpl->setContent($form->getHTML());
418  }
ilErrorHandling $error
$ilErr
Definition: raiseError.php:17
addExternalEditFormCustom(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ executeCommand()

ilObjBibliographicGUI::executeCommand ( )

executeCommand

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

References $DIC, ilObjectGUI\addHeaderAction(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getStandardCmd(), handleNonAccess(), initSubTabs(), ILIAS\Repository\object(), and ilObject2GUI\prepareOutput().

111  : void
112  {
113  global $DIC;
114  $ilNavigationHistory = $DIC['ilNavigationHistory'];
115 
116  // Navigation History
117  $link = $this->dic()->ctrl()->getLinkTarget($this, $this->getStandardCmd());
118  if ($this->object != null) {
119  $ilNavigationHistory->addItem($this->object->getRefId(), $link, "bibl");
120  $this->addHeaderAction();
121  }
122 
123  // general Access Check, especially for single entries not matching the object
124  if ($this->object instanceof ilObjBibliographic && !$DIC->access()->checkAccess(
125  'read',
126  "",
127  $this->object->getRefId()
128  )) {
129  $this->handleNonAccess();
130  }
131 
132  $next_class = $this->dic()->ctrl()->getNextClass($this);
133  $this->cmd = $this->dic()->ctrl()->getCmd();
134  switch ($next_class) {
135  case strtolower(ilInfoScreenGUI::class):
136  $this->prepareOutput();
137  $this->dic()->tabs()->activateTab(self::TAB_ID_INFO);
138  $this->infoScreenForward();
139  break;
140  case strtolower(ilCommonActionDispatcherGUI::class):
141  $this->prepareOutput();
143  $this->ctrl->forwardCommand($gui);
144  break;
145  case strtolower(ilPermissionGUI::class):
146  $this->prepareOutput();
147  $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
148  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
149  break;
150  case strtolower(ilObjectCopyGUI::class):
151  $cp = new ilObjectCopyGUI($this);
152  $cp->setType('bibl');
153  $this->dic()['tpl']->loadStandardTemplate();
154  $this->ctrl->forwardCommand($cp);
155  break;
156  case strtolower(ilExportGUI::class):
157  $this->prepareOutput();
158  $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
159  $exp_gui = new ilExportGUI($this);
160  $exp_gui->addFormat("xml");
161  $this->ctrl->forwardCommand($exp_gui);
162  break;
163  case strtolower(ilBiblFieldFilterGUI::class):
164  $this->prepareOutput();
165  $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
166  $this->initSubTabs();
167  $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
168  $this->ctrl->forwardCommand(new ilBiblFieldFilterGUI($this->facade));
169  break;
170  default:
171  $this->prepareOutput();
172  $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
173  switch ($cmd) {
174  case 'edit':
175  case 'update':
176  case self::CMD_EDIT_OBJECT:
177  case self::CMD_UPDATE_OBJECT:
178  $this->initSubTabs();
179  $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
180  $this->{$cmd}();
181  break;
182  default:
183  $this->{$cmd}();
184  break;
185  }
186  break;
187  }
188  }
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjBibliographic.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjBibliographicGUI::getEditFormCustomValues ( array &  $values)

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

462  : void
463  {
464  $values["is_online"] = $this->object->getOnline();
465  }

◆ getStandardCmd()

ilObjBibliographicGUI::getStandardCmd ( )

getStandardCmd

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

Referenced by executeCommand().

94  : string
95  {
96  return self::CMD_VIEW;
97  }
+ Here is the caller graph for this function:

◆ getType()

ilObjBibliographicGUI::getType ( )

getType

Deprecated:
REFACTOR use type factory via Facade

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

Referenced by addNews(), and save().

103  : string
104  {
105  return "bibl";
106  }
+ Here is the caller graph for this function:

◆ handleNonAccess()

ilObjBibliographicGUI::handleNonAccess ( )
private

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

References $DIC, and ilObjectGUI\_gotoRepositoryRoot().

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

672  : void
673  {
674  global $DIC;
675 
676  $this->tpl->setOnScreenMessage('failure', $DIC->language()->txt("no_permission"), true);
678  }
global $DIC
Definition: feed.php:28
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ 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 195 of file class.ilObjBibliographicGUI.php.

References $DIC, ilResourceStorageInfoGUI\append(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

195  : void
196  {
197  $this->ctrl->setCmd("showSummary");
198  $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
199  $this->infoScreenForward();
200  }
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjBibliographicGUI::initCreationForms ( string  $a_new_type)
protected
Returns
mixed[]

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

References $DIC, ILIAS\Repository\ctrl(), and ilFileInputGUI\setSuffixes().

Referenced by save().

277  : array
278  {
279  global $DIC;
280 
281  $forms = parent::initCreationForms($a_new_type);
282  // Add File-Upload
283  $in_file = new ilFileInputGUI($DIC->language()->txt("bibliography_file"), "bibliographic_file");
284  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
285  $in_file->setRequired(true);
286  $forms[self::CFORM_NEW]->addItem($in_file);
287  $this->ctrl->saveParameterByClass('ilobjrootfoldergui', 'new_type');
288  $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass('ilobjrootfoldergui', "save"));
289 
290  return $forms;
291  }
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjBibliographicGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

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

References $DIC, and ilPropertyFormGUI\addItem().

452  : void
453  {
454  global $DIC;
455 
456  $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
457  // is_online
458  $cb = new ilCheckboxInputGUI($DIC->language()->txt("online"), "is_online");
459  $a_form->addItem($cb);
460  }
This class represents a checkbox property in a property form.
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ initEditForm()

ilObjBibliographicGUI::initEditForm ( )

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

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

Referenced by editObject().

421  {
422  global $DIC;
423 
424  $form = parent::initEditForm();
425  // Add File-Upload
426  $in_file = new ilFileInputGUI(
427  $DIC->language()
428  ->txt("bibliography_file"),
429  "bibliographic_file"
430  );
431  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
432  $in_file->setRequired(false);
433  $cb_override = new ilCheckboxInputGUI(
434  $DIC->language()
435  ->txt("override_entries"),
436  "override_entries"
437  );
438  $cb_override->addSubItem($in_file);
439 
440  $form->addItem($cb_override);
441 
442  $section_appearance = new ilFormSectionHeaderGUI();
443  $section_appearance->setTitle($this->lng->txt('cont_presentation'));
444  $form->addItem($section_appearance);
445  $DIC->object()->commonSettings()->legacyForm($form, $this->object)->addTileImage();
446 
447  $form->setFormAction($DIC->ctrl()->getFormAction($this, "save"));
448 
449  return $form;
450  }
This class represents a property form user interface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a file property in a property form.
This class represents a checkbox property in a property form.
setSuffixes(array $a_suffixes)
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSubTabs()

ilObjBibliographicGUI::initSubTabs ( )
protected

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

References $DIC, ilBiblFieldFilterGUI\CMD_STANDARD, and ILIAS\Repository\ctrl().

Referenced by executeCommand().

376  : void
377  {
378  global $DIC;
379  $DIC->tabs()->addSubTab(
380  self::SUBTAB_SETTINGS,
381  $DIC->language()
382  ->txt(self::SUBTAB_SETTINGS),
383  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
384  );
385  $DIC->tabs()->addSubTab(
386  self::SUB_TAB_FILTER,
387  $DIC->language()
388  ->txt("bibl_filter"),
389  $this->ctrl->getLinkTargetByClass(ilBiblFieldFilterGUI::class, ilBiblFieldFilterGUI::CMD_STANDARD)
390  );
391  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromDesk()

ilObjBibliographicGUI::removeFromDesk ( )

Remove from desktop.

Alias for removeFromDeskObject. public

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

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

657  : void
658  {
659  $this->removeFromDeskObject();
660  }
removeFromDeskObject()
Remove from desktop public.
+ Here is the call graph for this function:

◆ render()

ilObjBibliographicGUI::render ( )

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

References showContent().

467  : void
468  {
469  $this->showContent();
470  }
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 518 of file class.ilObjBibliographicGUI.php.

References ILIAS\Repository\ctrl().

518  : void
519  {
520  $table = new ilBiblEntryTableGUI($this, $this->facade);
521  $table->resetFilter();
522  $table->resetOffset();
523  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
524  }
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:

◆ save()

ilObjBibliographicGUI::save ( )

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

References $DIC, getType(), and initCreationForms().

293  : void
294  {
295  global $DIC;
296 
297  $form = $this->initCreationForms($this->getType());
298  if ($form[self::CFORM_NEW]->checkInput()) {
299  parent::save();
300  } else {
301  $form = $form[self::CFORM_NEW];
302  $form->setValuesByPost();
303  $DIC->ui()->mainTemplate()->setContent($form->getHtml());
304  }
305  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ sendFile()

ilObjBibliographicGUI::sendFile ( )

provide file as a download

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

References $DIC, ilFileDelivery\deliverFileAttached(), handleNonAccess(), ILIAS\Repository\object(), and showContent().

529  : void
530  {
531  global $DIC;
532 
533  if ($DIC['ilAccess']->checkAccess('read', "", $this->object->getRefId())) {
534  if (!$this->object->isMigrated()) {
535  $file_path = $this->object->getLegacyAbsolutePath();
536  if ($file_path) {
537  if (is_file($file_path)) {
539  $file_path,
540  $this->object->getFilename(),
541  'application/octet-stream'
542  );
543  } else {
544  $this->tpl->setOnScreenMessage('failure', $DIC['lng']->txt("file_not_found"));
545  $this->showContent();
546  }
547  }
548  } else {
549  $this->storage->consume()->download($this->object->getResourceId())->run();
550  }
551  } else {
552  $this->handleNonAccess();
553  }
554  }
global $DIC
Definition: feed.php:28
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
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 475 of file class.ilObjBibliographicGUI.php.

References Vendor\Package\$b, $DIC, ilObject2GUI\$html, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilLinkButton\getInstance(), handleNonAccess(), and ILIAS\Repository\object().

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

475  : void
476  {
477  global $DIC;
478 
479  // if user has read permission and object is online OR user has write permissions
480  $read_access = $DIC->access()->checkAccess('read', "", $this->object->getRefId());
481  $online = $this->object->getOnline();
482  $write_access = $DIC->access()->checkAccess('write', "", $this->object->getRefId());
483  if (($read_access && $online) || $write_access) {
484  $DIC->tabs()->activateTab(self::TAB_CONTENT);
485 
487  $b->setCaption('download_original_file');
488  $b->setUrl($DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
489  $b->setPrimary(true);
490  $DIC->toolbar()->addButtonInstance($b);
491 
492  $table = new ilBiblEntryTableGUI($this, $this->facade);
493  $html = $table->getHTML();
494  $DIC->ui()->mainTemplate()->setContent($html);
495 
496  //Permanent Link
497  $DIC->ui()->mainTemplate()->setPermanentLink("bibl", $this->object->getRefId());
498  } else {
499  $object_title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->ref_id));
500  $this->tpl->setOnScreenMessage('failure', sprintf(
501  $DIC->language()
502  ->txt("msg_no_perm_read_item"),
503  $object_title
504  ), true);
505  //redirect to repository without any parameters
506  $this->handleNonAccess();
507  }
508  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDetails()

ilObjBibliographicGUI::showDetails ( )

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

References $DIC, ilObjectGUI\$id, handleNonAccess(), and ILIAS\Repository\object().

556  : void
557  {
558  global $DIC;
559 
560  if ($DIC->access()->checkAccess('read', "", $this->object->getRefId())) {
561  $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
562  $entry = $this->facade->entryFactory()
563  ->findByIdAndTypeString($id, $this->object->getFileTypeAsString());
564  $bibGUI = new ilBiblEntryDetailPresentationGUI($entry, $this->facade);
565 
566  $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
567  } else {
568  $this->handleNonAccess();
569  }
570  }
global $DIC
Definition: feed.php:28
Class ilBiblEntryDetailPresentationGUI.
+ Here is the call graph for this function:

◆ toggleNotification()

ilObjBibliographicGUI::toggleNotification ( )

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

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

599  : void
600  {
601  global $DIC;
602  $ntf = $DIC->http()->wrapper()->query()->retrieve(
603  "ntf",
604  $DIC->refinery()->to()->int()
605  );
606 
607  switch ($ntf) {
608  case 1:
611  $DIC->user()
612  ->getId(),
614  false
615  );
616  break;
617  case 2:
620  $DIC->user()
621  ->getId(),
623  true
624  );
625  break;
626  }
627  $DIC->ctrl()->redirect($this, "");
628  }
global $DIC
Definition: feed.php:28
static setNotification(int $type, int $user_id, int $id, bool $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 580 of file class.ilObjBibliographicGUI.php.

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

580  : void
581  {
582  global $DIC;
583 
584  if ($DIC->access()->checkAccess('write', "", $this->object->getRefId())) {
585  if ($this->object->getOnline() != $a_form->getInput("is_online")) {
586  $this->object->setOnline($a_form->getInput("is_online"));
587  }
588 
589  if (!empty($_FILES['bibliographic_file']['name'])) {
590  $this->addNews($this->object->getId(), 'updated');
591  }
592 
593  $DIC->object()->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
594  } else {
595  $this->handleNonAccess();
596  }
597  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
global $DIC
Definition: feed.php:28
addNews(int $obj_id, string $change='created')
+ Here is the call graph for this function:

◆ view()

ilObjBibliographicGUI::view ( )

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

References showContent().

572  : void
573  {
574  $this->showContent();
575  }
showContent()
shows the overview page with all entries in a table
+ Here is the call graph for this function:

Field Documentation

◆ $cmd

string ilObjBibliographicGUI::$cmd = self::CMD_SHOW_CONTENT
protected

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

◆ $facade

ilBiblFactoryFacade ilObjBibliographicGUI::$facade = null
protected

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

◆ $field_factory

ilBiblFieldFactory ilObjBibliographicGUI::$field_factory
protected

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

◆ $filter_factory

ilBiblFieldFilterFactory ilObjBibliographicGUI::$filter_factory
protected

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

◆ $object

ilObject ilObjBibliographicGUI::$object = null

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

◆ $stakeholder

ilObjBibliographicStakeholder ilObjBibliographicGUI::$stakeholder
protected

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

◆ $storage

ilObjBibliographicGUI::$storage
protected

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

◆ $translation_factory

ilBiblTranslationFactory ilObjBibliographicGUI::$translation_factory
protected

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

◆ $type_factory

ilBiblTypeFactory ilObjBibliographicGUI::$type_factory
protected

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

◆ CMD_EDIT

const ilObjBibliographicGUI::CMD_EDIT = "edit"

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

◆ CMD_EDIT_OBJECT

const ilObjBibliographicGUI::CMD_EDIT_OBJECT = 'editObject'

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

◆ CMD_SEND_FILE

const ilObjBibliographicGUI::CMD_SEND_FILE = "sendFile"

Definition at line 43 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 52 of file class.ilObjBibliographicGUI.php.

◆ CMD_UPDATE_OBJECT

const ilObjBibliographicGUI::CMD_UPDATE_OBJECT = 'updateObject'

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

◆ CMD_VIEW

const ilObjBibliographicGUI::CMD_VIEW = "view"

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

Referenced by ilBiblEntryTableGUI\__construct().

◆ P_ENTRY_ID

const ilObjBibliographicGUI::P_ENTRY_ID = 'entry_id'

◆ SUB_TAB_FILTER

const ilObjBibliographicGUI::SUB_TAB_FILTER = "filter"

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

◆ SUBTAB_SETTINGS

const ilObjBibliographicGUI::SUBTAB_SETTINGS = "settings"

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

◆ TAB_CONTENT

const ilObjBibliographicGUI::TAB_CONTENT = "content"

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

◆ TAB_EXPORT

const ilObjBibliographicGUI::TAB_EXPORT = "export"

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

◆ TAB_ID_INFO

const ilObjBibliographicGUI::TAB_ID_INFO = "id_info"

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

◆ TAB_ID_PERMISSIONS

const ilObjBibliographicGUI::TAB_ID_PERMISSIONS = "id_permissions"

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

◆ TAB_ID_RECORDS

const ilObjBibliographicGUI::TAB_ID_RECORDS = "id_records"

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

◆ TAB_SETTINGS

const ilObjBibliographicGUI::TAB_SETTINGS = self::SUBTAB_SETTINGS

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

Referenced by ilBiblFieldFilterGUI\executeCommand().


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