ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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

 __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 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
 $tree
 
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 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
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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  }
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
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 251 of file class.ilObjBibliographicGUI.php.

References $DIC, and P_ENTRY_ID.

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

◆ addLocatorItems()

ilObjBibliographicGUI::addLocatorItems ( )

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

References $DIC, and ilObject2GUI\$node_id.

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

◆ addNews()

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

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

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

Referenced by save(), and updateCustom().

672  {
673  global $DIC;
674 
675  $ilNewsItem = new ilNewsItem();
676  $ilNewsItem->setTitle($DIC->language()->txt('news_title_' . $change));
677  $ilNewsItem->setPriority(NEWS_NOTICE);
678  $ilNewsItem->setContext($obj_id, $this->getType());
679  $ilNewsItem->setUserId($DIC->user()->getId());
680  $ilNewsItem->setVisibility(NEWS_USERS);
681  $ilNewsItem->setContentTextIsLangVar(false);
682  $ilNewsItem->create();
683  }
const NEWS_NOTICE
$DIC
Definition: xapitoken.php:46
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 692 of file class.ilObjBibliographicGUI.php.

References ilDesktopItemHandling\addToDeskObject().

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

◆ applyFilter()

ilObjBibliographicGUI::applyFilter ( )
protected

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

554  {
555  $table = new ilBiblEntryTableGUI($this, $this->facade);
556  $table->writeFilterToSession();
557  $table->resetOffset();
558  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
559  }
Class ilDataCollectionField.

◆ editObject()

ilObjBibliographicGUI::editObject ( )

edit object

public

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

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

422  {
423  $tpl = $this->tpl;
424  $ilTabs = $this->tabs_gui;
426 
427  if (!$this->checkPermissionBool("write")) {
428  $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
429  }
430 
431  $ilTabs->activateTab("settings");
432 
433  $form = $this->initEditForm();
434  $values = $this->getEditFormValues();
435  if ($values) {
436  $form->setValuesByArray($values, true);
437  }
438 
439  $this->addExternalEditFormCustom($form);
440 
441  $tpl->setContent($form->getHTML());
442  }
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  $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
145  $this->ctrl->forwardCommand($gui);
146  break;
147  case strtolower(ilPermissionGUI::class):
148  $this->prepareOutput();
149  $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
150  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
151  break;
152  case strtolower(ilObjectCopyGUI::class):
153  $cp = new ilObjectCopyGUI($this);
154  $cp->setType('bibl');
155  $this->dic()['tpl']->loadStandardTemplate();
156  $this->ctrl->forwardCommand($cp);
157  break;
158  case strtolower(ilObjFileGUI::class):
159  $this->prepareOutput();
160  $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
161  $this->ctrl->forwardCommand(new ilObjFile($this));
162  break;
163  case strtolower(ilExportGUI::class):
164  $this->prepareOutput();
165  $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
166  $exp_gui = new ilExportGUI($this);
167  $exp_gui->addFormat("xml");
168  $this->ctrl->forwardCommand($exp_gui);
169  break;
170  case strtolower(ilBiblFieldFilterGUI::class):
171  $this->prepareOutput();
172  $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
173  $this->initSubTabs();
174  $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
175  $this->ctrl->forwardCommand(new ilBiblFieldFilterGUI($this->facade));
176  break;
177  default:
178  $this->prepareOutput();
179  $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
180  switch ($cmd) {
181  case 'edit':
182  case 'update':
183  case self::CMD_EDIT_OBJECT:
184  case self::CMD_UPDATE_OBJECT:
185  $this->initSubTabs();
186  $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
187  $this->{$cmd}();
188  break;
189  default:
190  $this->{$cmd}();
191  break;
192  }
193  break;
194  }
195 
196  return true;
197  }
infoScreenForward()
show information screen
GUI class for the workflow of copying objects.
Export User Interface Class.
Class ilBiblFieldFilterGUI.
$DIC
Definition: xapitoken.php:46
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilObjBibliographic.
addHeaderAction()
Add header action menu.
Class ilCommonActionDispatcherGUI.
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 497 of file class.ilObjBibliographicGUI.php.

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

◆ 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 723 of file class.ilObjBibliographicGUI.php.

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

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

724  {
725  global $DIC;
726 
727  unset($_GET);
728  ilUtil::sendFailure($DIC->language()->txt("no_permission"), true);
730  }
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$DIC
Definition: xapitoken.php:46
+ 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 205 of file class.ilObjBibliographicGUI.php.

References infoScreenForward().

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

◆ infoScreenForward()

ilObjBibliographicGUI::infoScreenForward ( )

show information screen

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

References $DIC, and ilUtil\sendFailure().

Referenced by executeCommand(), and infoScreen().

217  {
218  global $DIC;
219 
220  if (!$this->checkPermissionBoolAndReturn("visible") && !$this->checkPermissionBoolAndReturn('read')) {
221  ilUtil::sendFailure($DIC['lng']->txt("msg_no_perm_read"), true);
222  $this->ctrl->redirectByClass('ilDashboardGUI', '');
223  }
224  $DIC->tabs()->activateTab(self::TAB_ID_INFO);
225  $info = new ilInfoScreenGUI($this);
226  $info->enablePrivateNotes();
227  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
228  $this->ctrl->forwardCommand($info);
229  }
Class ilInfoScreenGUI.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$DIC
Definition: xapitoken.php:46
+ 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 286 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilFileInputGUI\setSuffixes().

Referenced by save().

287  {
288  global $DIC;
289 
290  $forms = parent::initCreationForms($a_new_type);
291  // Add File-Upload
292  $in_file = new ilFileInputGUI($DIC->language()->txt("bibliography_file"), "bibliographic_file");
293  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
294  $in_file->setRequired(true);
295  $forms[self::CFORM_NEW]->addItem($in_file);
296  $this->ctrl->saveParameterByClass('ilobjrootfoldergui', 'new_type');
297  $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass('ilobjrootfoldergui', "save"));
298 
299  return $forms;
300  }
This class represents a file property in a property form.
$DIC
Definition: xapitoken.php:46
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 481 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilPropertyFormGUI\addItem().

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

◆ initEditForm()

ilObjBibliographicGUI::initEditForm ( )

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

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

Referenced by editObject().

446  {
447  global $DIC;
448 
449  $form = parent::initEditForm();
450  // Add File-Upload
451  $in_file = new ilFileInputGUI(
452  $DIC->language()
453  ->txt("bibliography_file"),
454  "bibliographic_file"
455  );
456  $in_file->setSuffixes(array("ris", "bib", "bibtex"));
457  $in_file->setRequired(false);
458  $cb_override = new ilCheckboxInputGUI(
459  $DIC->language()
460  ->txt("override_entries"),
461  "override_entries"
462  );
463  $cb_override->addSubItem($in_file);
464 
465  $form->addItem($cb_override);
466 
467  $section_appearance = new ilFormSectionHeaderGUI();
468  $section_appearance->setTitle($this->lng->txt('cont_presentation'));
469  $form->addItem($section_appearance);
470  $DIC->object()->commonSettings()->legacyForm($form, $this->object)->addTileImage();
471 
472  $form->setFormAction($DIC->ctrl()->getFormAction($this, "save"));
473 
474  return $form;
475  }
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.
$DIC
Definition: xapitoken.php:46
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 398 of file class.ilObjBibliographicGUI.php.

References $DIC, and ilBiblFieldFilterGUI\CMD_STANDARD.

Referenced by executeCommand().

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

◆ removeFromDesk()

ilObjBibliographicGUI::removeFromDesk ( )

Remove from desktop.

Alias for removeFromDeskObject.

public

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

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

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

◆ render()

ilObjBibliographicGUI::render ( )

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

References showContent().

506  {
507  $this->showContent();
508  }
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 562 of file class.ilObjBibliographicGUI.php.

563  {
564  $table = new ilBiblEntryTableGUI($this, $this->facade);
565  $table->resetFilter();
566  $table->resetOffset();
567  $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
568  }
Class ilDataCollectionField.

◆ save()

ilObjBibliographicGUI::save ( )

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

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

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

◆ sendFile()

ilObjBibliographicGUI::sendFile ( )

provide file as a download

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

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

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

◆ showContent()

ilObjBibliographicGUI::showContent ( )

shows the overview page with all entries in a table

Definition at line 514 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().

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

◆ showDetails()

ilObjBibliographicGUI::showDetails ( )

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

References $DIC, and handleNonAccess().

595  {
596  global $DIC;
597 
598  if ($DIC->access()->checkAccess('read', "", $this->object->getRefId())) {
599  $id = $DIC->http()->request()->getQueryParams()[self::P_ENTRY_ID];
600  $entry = $this->facade->entryFactory()
601  ->findByIdAndTypeString($id, $this->object->getFileTypeAsString());
602  $bibGUI = new ilBiblEntryDetailPresentationGUI($entry, $this->facade);
603 
604  $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
605  } else {
606  $this->handleNonAccess();
607  }
608  }
$DIC
Definition: xapitoken.php:46
Class ilBiblEntryDetailPresentationGUI.
+ Here is the call graph for this function:

◆ toggleNotification()

ilObjBibliographicGUI::toggleNotification ( )

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

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

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

◆ updateCustom()

ilObjBibliographicGUI::updateCustom ( ilPropertyFormGUI  $a_form)

updateSettings

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

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

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

◆ view()

ilObjBibliographicGUI::view ( )

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

References showContent().

612  {
613  $this->showContent();
614  }
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: