ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 Functions to be overwritten. More...
 
 save ()
 
 initEditForm ()
 Init object edit form. More...
 
 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 ()
 view object content (repository/workspace switch) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 updateSettings More...
 
 toggleNotification ()
 
 addNews ($obj_id, $change='created')
 
 addToDeskObject ()
 Add desktop item. More...
 
 removeFromDeskObject ()
 Remove from desktop. More...
 
 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)
 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...
 
 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...
 
- 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object 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 ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access 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 CMD_VIEW = "view"
 
const TAB_EXPORT = "export"
 
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"
 
- 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
 
 $ilias
 
 $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)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
- 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...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 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...
 
 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...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) 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...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 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...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 
 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...
 
 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

 $bibl_obj
 
 $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
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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

Reimplemented from ilObject2GUI.

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

55 {
56 global $DIC;
57 $this->lng = $DIC['lng'];
58 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
59 $this->lng->loadLanguageModule('bibl');
60 if ($a_id > 0) {
61 $this->bibl_obj = $this->object;
62 }
63 }
global $DIC

References $DIC, and ilObjectGUI\$object.

Member Function Documentation

◆ _goto()

static ilObjBibliographicGUI::_goto (   $a_target)
static

_goto Deep link

Parameters
string$a_target

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

206 {
207 global $DIC;
208
209 $id = explode("_", $a_target);
210 $DIC['ilCtrl']->setTargetScript("ilias.php");
211 $DIC['ilCtrl']->initBaseClass("ilRepositoryGUI");
212 $DIC['ilCtrl']->setParameterByClass("ilobjbibliographicgui", "ref_id", $id[0]);
213 // Detail-View
214 if ($id[1]) {
215 $DIC['ilCtrl']->setParameterByClass("ilobjbibliographicgui", ilObjBibliographicGUI::P_ENTRY_ID, $id[1]);
216 $DIC['ilCtrl']->redirectByClass(array( "ilRepositoryGUI", "ilobjbibliographicgui" ), self::CMD_SHOW_DETAILS);
217 } else {
218 $DIC['ilCtrl']->redirectByClass(array( "ilRepositoryGUI", "ilobjbibliographicgui" ), self::CMD_VIEW);
219 }
220 }

References $DIC, and P_ENTRY_ID.

◆ addLocatorItems()

ilObjBibliographicGUI::addLocatorItems ( )

Functions to be overwritten.

Reimplemented from ilObject2GUI.

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

191 {
192 global $DIC;
193 $ilLocator = $DIC['ilLocator'];
194 if (is_object($this->object)) {
195 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
196 }
197 }

References $DIC.

◆ addNews()

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

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

479 {
480 global $DIC;
481 $lng = $DIC['lng'];
482 $ilUser = $DIC['ilUser'];
483
484 $ilNewsItem = new ilNewsItem();
485 $ilNewsItem->setTitle($lng->txt('news_title_' . $change));
486 $ilNewsItem->setPriority(NEWS_NOTICE);
487 $ilNewsItem->setContext($obj_id, $this->getType());
488 $ilNewsItem->setUserId($ilUser->getId());
489 $ilNewsItem->setVisibility(NEWS_USERS);
490 $ilNewsItem->setContentTextIsLangVar(false);
491 $ilNewsItem->create();
492 }
const NEWS_USERS
const NEWS_NOTICE
$ilUser
Definition: imgupload.php:18

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

Referenced by updateCustom().

+ 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.

@access public

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

526 {
527 $this->addToDeskObject();
528 }

References addToDeskObject().

+ Here is the call graph for this function:

◆ addToDeskObject()

ilObjBibliographicGUI::addToDeskObject ( )

Add desktop item.

@access public

Implements ilDesktopItemHandling.

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

500 {
501 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
503 ilUtil::sendSuccess($this->lng->txt("added_to_desktop"), true);
504 $this->ctrl->redirect($this, self::CMD_VIEW);
505 }
static addToDesktop()
Add desktop item @access public.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilDesktopItemGUI\addToDesktop(), and ilUtil\sendSuccess().

Referenced by addToDesk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjBibliographicGUI::executeCommand ( )

executeCommand

Reimplemented from ilObject2GUI.

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

89 {
90 global $DIC;
91 $ilCtrl = $DIC['ilCtrl'];
92 $ilTabs = $DIC['ilTabs'];
93 $ilNavigationHistory = $DIC['ilNavigationHistory'];
94 $tpl = $DIC['tpl'];
95
96 // Navigation History
97 $link = $ilCtrl->getLinkTarget($this, $this->getStandardCmd());
98 if ($this->object != null) {
99 $ilNavigationHistory->addItem($this->object->getRefId(), $link, "bibl");
100 $this->addHeaderAction();
101 }
102
103 // general Access Check, especially for single entries not matching the object
104 if ($this->object instanceof ilObjBibliographic && !$DIC['ilAccess']->checkAccess('visible', "", $this->object->getRefId())) {
105 $this->handleNonAccess();
106 }
107
108 $next_class = $ilCtrl->getNextClass($this);
109 $this->cmd = $ilCtrl->getCmd();
110 switch ($next_class) {
111 case "ilinfoscreengui":
112 $this->prepareOutput();
113 $ilTabs->activateTab(self::TAB_ID_INFO);
114 $this->infoScreenForward();
115 break;
116 case "ilcommonactiondispatchergui":
117 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
119 $this->ctrl->forwardCommand($gui);
120 break;
121 case "ilpermissiongui":
122 $this->prepareOutput();
123 $ilTabs->activateTab(self::TAB_ID_PERMISSIONS);
124 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
125 $perm_gui = new ilPermissionGUI($this);
126 $this->ctrl->forwardCommand($perm_gui);
127 break;
128 case "ilobjectcopygui":
129 include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
130 $cp = new ilObjectCopyGUI($this);
131 $cp->setType('bibl');
132 $tpl->getStandardTemplate();
133 $this->ctrl->forwardCommand($cp);
134 break;
135 case "ilobjfilegui":
136 $this->prepareOutput();
137 $ilTabs->setTabActive(self::TAB_ID_RECORDS);
138 include_once("./Modules/File/classes/class.ilObjFile.php");
139 $file_gui = new ilObjFile($this);
140 $this->ctrl->forwardCommand($file_gui);
141 break;
142 case "ilexportgui":
143 $this->prepareOutput();
144 $ilTabs->setTabActive(self::TAB_EXPORT);
145 $exp_gui = new ilExportGUI($this);
146 $exp_gui->addFormat("xml");
147 $this->ctrl->forwardCommand($exp_gui);
148 break;
149 default:
150 return parent::executeCommand();
151 }
152
153 return true;
154 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
infoScreenForward()
show information screen
Class ilObjBibliographic.
Class ilObjFile.
prepareOutput($a_show_subobjects=true)
prepare output
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
global $ilCtrl
Definition: ilias.php:18

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

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

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

Reimplemented from ilObjectGUI.

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

348 {
349 $a_values["is_online"] = $this->object->getOnline();
350
351 return $a_values;
352 }

◆ getStandardCmd()

ilObjBibliographicGUI::getStandardCmd ( )

getStandardCmd

Returns
String

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

References CMD_VIEW.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getType()

ilObjBibliographicGUI::getType ( )

getType

Returns
String

Reimplemented from ilObject2GUI.

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

81 {
82 return "bibl";
83 }

Referenced by addNews(), and save().

+ Here is the caller graph for this function:

◆ handleNonAccess()

ilObjBibliographicGUI::handleNonAccess ( )
private

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

553 {
554 global $DIC;
555
556 unset($_GET);
557 ilUtil::sendFailure($DIC->language()->txt("no_permission"), true);
559 }
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

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

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

+ 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 162 of file class.ilObjBibliographicGUI.php.

162 {
163 $this->ctrl->setCmd("showSummary");
164 $this->ctrl->setCmdClass("ilinfoscreengui");
165 $this->infoScreenForward();
166 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjBibliographicGUI::infoScreenForward ( )

show information screen

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

172 {
173 global $DIC;
174
175 if (!$this->checkPermissionBool("visible")) {
176 ilUtil::sendFailure($DIC['lng']->txt("msg_no_perm_read"), true);
177 $this->ctrl->redirectByClass('ilPersonalDesktopGUI', '');
178 }
179 $DIC['ilTabs']->activateTab(self::TAB_ID_INFO);
180 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
181 $info = new ilInfoScreenGUI($this);
182 $info->enablePrivateNotes();
183 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
184 $this->ctrl->forwardCommand($info);
185 }
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$info
Definition: example_052.php:80

References $DIC, $info, ilObject2GUI\checkPermissionBool(), and ilUtil\sendFailure().

Referenced by executeCommand(), and infoScreen().

+ 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

Reimplemented from ilObject2GUI.

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

228 {
229 global $DIC;
230 $forms = parent::initCreationForms($a_new_type);
231 // Add File-Upload
232 $in_file = new ilFileInputGUI($this->lng->txt("bibliography file"), "bibliographic_file");
233 $in_file->setSuffixes(array( "ris", "bib", "bibtex" ));
234 $in_file->setRequired(true);
235 $forms[self::CFORM_NEW]->addItem($in_file);
236 $this->ctrl->saveParameterByClass('ilobjrootfoldergui', 'new_type');
237 $forms[self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass('ilobjrootfoldergui', "save"));
238
239 return $forms;
240 }
This class represents a file property in a property form.

References $DIC, and ilObjectGUI\CFORM_NEW.

Referenced by save().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

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

Reimplemented from ilObjectGUI.

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

333 {
334 global $DIC;
335 $ilTabs = $DIC['ilTabs'];
336 $ilTabs->activateTab("settings");
337 // is_online
338 $cb = new ilCheckboxInputGUI($this->lng->txt("online"), "is_online");
339 $a_form->addItem($cb);
340 }
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).

References $DIC, and ilPropertyFormGUI\addItem().

+ Here is the call graph for this function:

◆ initEditForm()

ilObjBibliographicGUI::initEditForm ( )

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

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

313 {
314 global $DIC;
315 $lng = $DIC['lng'];
316 $form = parent::initEditForm();
317 // Add File-Upload
318 $in_file = new ilFileInputGUI($lng->txt("bibliography file"), "bibliographic_file");
319 $in_file->setSuffixes(array( "ris", "bib", "bibtex" ));
320 $in_file->setRequired(false);
321 $cb_override = new ilCheckboxInputGUI($this->lng->txt("override_entries"), "override_entries");
322 $cb_override->addSubItem($in_file);
323 $form->addItem($cb_override);
324 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
325
326 return $form;
327 }

References $DIC, and ilObjectGUI\$lng.

◆ removeFromDesk()

ilObjBibliographicGUI::removeFromDesk ( )

Remove from desktop.

Alias for removeFromDeskObject.

@access public

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

536 {
537 $this->removeFromDeskObject();
538 }
removeFromDeskObject()
Remove from desktop.

References removeFromDeskObject().

+ Here is the call graph for this function:

◆ removeFromDeskObject()

ilObjBibliographicGUI::removeFromDeskObject ( )

Remove from desktop.

@access public

Implements ilDesktopItemHandling.

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

513 {
514 include_once './Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
516 ilUtil::sendSuccess($this->lng->txt("removed_from_desktop"), true);
517 $this->ctrl->redirect($this, self::CMD_VIEW);
518 }
static removeFromDesktop()
Remove item from personal desktop @access public.

References ilDesktopItemGUI\removeFromDesktop(), and ilUtil\sendSuccess().

Referenced by removeFromDesk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ render()

ilObjBibliographicGUI::render ( )

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

355 {
356 $this->showContent();
357 }
showContent()
shows the overview page with all entries in a table

References showContent().

+ Here is the call graph for this function:

◆ save()

ilObjBibliographicGUI::save ( )

Reimplemented from ilObject2GUI.

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

243 {
244 global $DIC;
245 $tpl = $DIC['tpl'];
246 $form = $this->initCreationForms($this->getType());
247 if ($form[self::CFORM_NEW]->checkInput()) {
248 parent::save();
249 } else {
250 $form = $form[self::CFORM_NEW];
251 $form->setValuesByPost();
252 $tpl->setContent($form->getHtml());
253 }
254 }

References $DIC, ilObjectGUI\$tpl, ilObjectGUI\CFORM_NEW, getType(), and initCreationForms().

+ Here is the call graph for this function:

◆ sendFile()

ilObjBibliographicGUI::sendFile ( )

provide file as a download

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

402 {
403 global $DIC;
404
405 if ($DIC['ilAccess']->checkAccess('read', "", $this->object->getRefId())) {
406 $file_path = $this->bibl_obj->getFileAbsolutePath();
407 if ($file_path) {
408 if (is_file($file_path)) {
409 require_once('./Services/FileDelivery/classes/class.ilFileDelivery.php');
410 ilFileDelivery::deliverFileAttached($file_path, null, 'application/octet-stream');
411 } else {
412 ilUtil::sendFailure($DIC['lng']->txt("file_not_found"));
413 $this->showContent();
414 }
415 }
416 } else {
417 $this->handleNonAccess();
418 }
419 }
static deliverFileAttached($path_to_file, $download_file_name=null, $mime_type=null, $delete_file=false)

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

+ Here is the call graph for this function:

◆ showContent()

ilObjBibliographicGUI::showContent ( )

shows the overview page with all entries in a table

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

363 {
364 global $DIC;
365 $ilAccess = $DIC['ilAccess'];
366 $ilCtrl = $DIC['ilCtrl'];
367 $ilTabs = $DIC['ilTabs'];
368 // if user has read permission and object is online OR user has write permissions
369 if (($ilAccess->checkAccess('read', "", $this->object->getRefId()) && $this->object->getOnline())
370 || $ilAccess->checkAccess('write', "", $this->object->getRefId())
371 ) {
372 $ilTabs->setTabActive(self::TAB_CONTENT);
373
374 // With new UI service, currently not supported by ilToolbar
375 // $f = $DIC->ui()->factory()->button()
376 // ->primary($lng->txt("download_original_file"), $ilCtrl->getLinkTargetByClass("ilBibliographicDetailsGUI", "sendFile"));
377 // $ilToolbar->addText($DIC->ui()->renderer()->render($f));
378
380 $b->setCaption('download_original_file');
381 $b->setUrl($ilCtrl->getLinkTargetByClass("ilBibliographicDetailsGUI", self::CMD_SEND_FILE));
382 $b->setPrimary(true);
383 $DIC['ilToolbar']->addButtonInstance($b);
384
385 include_once "./Modules/Bibliographic/classes/class.ilBibliographicRecordListTableGUI.php";
386 $table = new ilDataBibliographicRecordListTableGUI($this, self::CMD_SHOW_CONTENT);
387 $html = $table->getHTML();
388 $DIC['tpl']->setContent($html);
389
390 //Permanent Link
391 $DIC['tpl']->setPermanentLink("bibl", $this->object->getRefId());
392 } else {
393 //redirect to repository without any parameters
394 $this->handleNonAccess();
395 }
396 }
static getInstance()
Factory.
$html
Definition: example_001.php:87

References $DIC, $html, $ilCtrl, ilLinkButton\getInstance(), and handleNonAccess().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDetails()

ilObjBibliographicGUI::showDetails ( )

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

422 {
423 global $DIC;
424
425 if ($DIC['ilAccess']->checkAccess('read', "", $this->object->getRefId())) {
426 $bibGUI = ilBibliographicDetailsGUI::getInstance($this->bibl_obj, $_GET[self::P_ENTRY_ID]);
427 $this->tpl->setContent($bibGUI->getHTML());
428 } else {
429 $this->handleNonAccess();
430 }
431 }
static getInstance(ilObjBibliographic $bibl_obj, $entry_id)

References $_GET, $DIC, ilBibliographicDetailsGUI\getInstance(), and handleNonAccess().

+ Here is the call graph for this function:

◆ toggleNotification()

ilObjBibliographicGUI::toggleNotification ( )

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

459 {
460 global $DIC;
461 $ilCtrl = $DIC['ilCtrl'];
462 $ilUser = $DIC['ilUser'];
463 include_once "./Services/Notification/classes/class.ilNotification.php";
464 switch ($_GET["ntf"]) {
465 case 1:
467 break;
468 case 2:
470 break;
471 }
472 $ilCtrl->redirect($this, "");
473 }
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.

References $_GET, $DIC, $ilCtrl, $ilUser, ilNotification\setNotification(), and ilNotification\TYPE_DATA_COLLECTION.

+ Here is the call graph for this function:

◆ updateCustom()

ilObjBibliographicGUI::updateCustom ( ilPropertyFormGUI  $a_form)

updateSettings

Reimplemented from ilObjectGUI.

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

442 {
443 global $DIC;
444 $ilAccess = $DIC['ilAccess'];
445 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
446 if ($this->object->getOnline() != $a_form->getInput("is_online")) {
447 $this->object->setOnline($a_form->getInput("is_online"));
448 }
449
450 if (!empty($_FILES['bibliographic_file']['name'])) {
451 $this->addNews($this->bibl_obj->getId(), 'updated');
452 }
453 } else {
454 $this->handleNonAccess();
455 }
456 }
addNews($obj_id, $change='created')
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

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

+ Here is the call graph for this function:

◆ view()

ilObjBibliographicGUI::view ( )

view object content (repository/workspace switch)

Reimplemented from ilObject2GUI.

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

434 {
435 $this->showContent();
436 }

References showContent().

+ Here is the call graph for this function:

Field Documentation

◆ $bibl_obj

ilObjBibliographicGUI::$bibl_obj
protected

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

◆ $cmd

ilObjBibliographicGUI::$cmd = self::CMD_SHOW_CONTENT
protected

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

◆ CMD_EDIT

const ilObjBibliographicGUI::CMD_EDIT = "edit"

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

◆ CMD_SEND_FILE

const ilObjBibliographicGUI::CMD_SEND_FILE = "sendFile"

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

◆ CMD_SHOW_CONTENT

const ilObjBibliographicGUI::CMD_SHOW_CONTENT = 'showContent'

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

◆ CMD_SHOW_DETAILS

const ilObjBibliographicGUI::CMD_SHOW_DETAILS = "showDetails"

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

◆ CMD_VIEW

const ilObjBibliographicGUI::CMD_VIEW = "view"

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

Referenced by getStandardCmd().

◆ P_ENTRY_ID

const ilObjBibliographicGUI::P_ENTRY_ID = 'entry_id'

◆ TAB_CONTENT

const ilObjBibliographicGUI::TAB_CONTENT = "content"

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

◆ TAB_EXPORT

const ilObjBibliographicGUI::TAB_EXPORT = "export"

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

◆ TAB_ID_INFO

const ilObjBibliographicGUI::TAB_ID_INFO = "id_info"

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

◆ TAB_ID_PERMISSIONS

const ilObjBibliographicGUI::TAB_ID_PERMISSIONS = "id_permissions"

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

◆ TAB_ID_RECORDS

const ilObjBibliographicGUI::TAB_ID_RECORDS = "id_records"

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


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