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

Class ilObjDataCollectionGUI. More...

+ Inheritance diagram for ilObjDataCollectionGUI:
+ Collaboration diagram for ilObjDataCollectionGUI:

Public Member Functions

 getStandardCmd ()
 
 getType ()
 
 executeCommand ()
 
 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...
 
 render ()
 show Content; redirect to ilDclRecordListGUI::listRecords More...
 
 infoScreenForward ()
 show information screen More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 setTabs ()
 setTabs create tabs (repository/workspace switch) More...
 
 editObject ()
 edit object More...
 
 listRecords ()
 called by goto More...
 
 getDataCollectionObject ()
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $a_form)
 
 toggleNotification ()
 
 addHeaderAction ($a_redraw=false)
 
- 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...
 
 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 @access 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 ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto ($a_target)
 
- 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 GET_DCL_GTR = "dcl_gtr"
 
const GET_REF_ID = "ref_id"
 
const GET_VIEW_ID = "tableview_id"
 
 $object
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreationForms ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 initEditForm ()
 Init object edit form. More...
 
- 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 ()
 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...
 
 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 @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...
 
 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...
 

Private Member Functions

 emptyInfo ()
 

Additional Inherited Members

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

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjDataCollectionGUI::_goto (   $a_target)
static
Parameters
$a_target

Definition at line 356 of file class.ilObjDataCollectionGUI.php.

357 {
358 global $DIC;
359
360 $ilAccess = $DIC->access();
361 $lng = $DIC->language();
362
363 $id = explode("_", $a_target);
364
365 if ($ilAccess->checkAccess('read', "", $a_target)) {
366 $_GET["baseClass"] = "ilRepositoryGUI";
367 $_GET[self::GET_REF_ID] = $id[0]; // ref_id
368 $_GET[self::GET_VIEW_ID] = $id[1]; // view_id
369 $_GET[self::GET_DCL_GTR] = $id[2]; // record_id
370 $_GET["cmd"] = "listRecords";
371 require_once('./ilias.php');
372 exit;
373 }
374
375 if ($ilAccess->checkAccess('visible', "", $a_target)) {
376 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
377 }
378
380 sprintf(
381 $lng->txt("msg_no_perm_read_item"),
383 ),
384 true
385 );
387 }
$_GET["client_id"]
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $DIC
Definition: goto.php:24
exit
Definition: login.php:29

References $_GET, $DIC, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, GET_DCL_GTR, GET_REF_ID, GET_VIEW_ID, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addHeaderAction()

ilObjDataCollectionGUI::addHeaderAction (   $a_redraw = false)
Parameters
bool$a_redraw
Returns
string|void

Definition at line 639 of file class.ilObjDataCollectionGUI.php.

640 {
641 global $DIC;
642 $ilUser = $DIC['ilUser'];
643 $ilAccess = $DIC['ilAccess'];
644 $tpl = $DIC['tpl'];
645 $lng = $DIC['lng'];
646 $ilCtrl = $DIC['ilCtrl'];
647
648 $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, "dcl", $this->ref_id, $this->obj_id);
649
650 ilObjectListGUI::prepareJSLinks(
651 $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
652 $ilCtrl->getLinkTargetByClass(
653 array(
654 "ilcommonactiondispatchergui",
655 "ilnotegui",
656 ),
657 "",
658 "",
659 true,
660 false
661 ),
662 $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
663 );
664
665 $lg = $dispatcher->initHeaderAction();
666 //$lg->enableNotes(true);
667 //$lg->enableComments(ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()), false);
668
669 // notification
670 if ($ilUser->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
672 //Command Activate Notification
673 $ilCtrl->setParameter($this, "ntf", 1);
674 $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_deactivate_dcl");
675
676 $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.svg"), $lng->txt("dcl_notification_activated"));
677 } else {
678 //Command Deactivate Notification
679 $ilCtrl->setParameter($this, "ntf", 2);
680 $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_activate_dcl");
681
682 $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.svg"), $lng->txt("dcl_notification_deactivated"));
683 }
684 $ilCtrl->setParameter($this, "ntf", "");
685 }
686
687 if (!$a_redraw) {
688 $tpl->setHeaderActionMenu($lg->getHeaderAction());
689 } else {
690 return $lg->getHeaderAction();
691 }
692
693 $tpl->setHeaderActionMenu($lg->getHeaderAction());
694 }
Class ilCommonActionDispatcherGUI.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const ANONYMOUS_USER_ID
Definition: constants.php:25
$ilUser
Definition: imgupload.php:18

References $DIC, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ANONYMOUS_USER_ID, ilUtil\getImagePath(), ilNotification\hasNotification(), ilNotification\TYPE_DATA_COLLECTION, and ilCommonActionDispatcherGUI\TYPE_REPOSITORY.

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjDataCollectionGUI::addLocatorItems ( )

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 342 of file class.ilObjDataCollectionGUI.php.

343 {
344 global $DIC;
345 $ilLocator = $DIC['ilLocator'];
346
347 if (is_object($this->object)) {
348 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
349 }
350 }

References $DIC.

◆ afterSave()

ilObjDataCollectionGUI::afterSave ( ilObject  $a_new_object)
protected
Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 406 of file class.ilObjDataCollectionGUI.php.

407 {
408 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
409 $this->ctrl->redirectByClass("ilDclTableListGUI", "listTables");
410 }

◆ editObject()

ilObjDataCollectionGUI::editObject ( )

edit object

@access public

Reimplemented from ilObjectGUI.

Definition at line 466 of file class.ilObjDataCollectionGUI.php.

467 {
469 $ilTabs = $this->tabs_gui;
471
472 if (!$this->checkPermissionBool("write")) {
473 $ilErr->raiseError($this->lng->txt("msg_no_perm_write"), $ilErr->MESSAGE);
474 }
475
476 $ilTabs->activateTab("settings");
477
478 $form = $this->initEditForm();
479 $values = $this->getEditFormValues();
480 if ($values) {
481 $form->setValuesByArray($values, true);
482 }
483
484 $this->addExternalEditFormCustom($form);
485
486 $tpl->setContent($form->getHTML());
487 }
initEditForm()
Init object edit form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getEditFormValues()
Get values for edit form.
addExternalEditFormCustom(ilPropertyFormGUI $a_form)

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

Referenced by executeCommand().

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

◆ emptyInfo()

ilObjDataCollectionGUI::emptyInfo ( )
private

Definition at line 602 of file class.ilObjDataCollectionGUI.php.

603 {
604 global $DIC;
605 $lng = $DIC['lng'];
606 $this->table = ilDclCache::getTableCache($this->object->getFirstVisibleTableId());
607 $tables = $this->object->getTables();
608 if (count($tables) == 1 and count($this->table->getRecordFields()) == 0 and count($this->table->getRecords()) == 0
609 and $this->object->getOnline()
610 ) {
611 ilUtil::sendInfo($lng->txt("dcl_no_content_warning"), true);
612 }
613 }
static getTableCache($table_id=0)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $DIC, ilObjectGUI\$lng, ilDclCache\getTableCache(), and ilUtil\sendInfo().

Referenced by updateCustom().

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

◆ executeCommand()

ilObjDataCollectionGUI::executeCommand ( )
Returns
bool
Exceptions
ilCtrlException

Reimplemented from ilObject2GUI.

Definition at line 149 of file class.ilObjDataCollectionGUI.php.

150 {
151 global $DIC;
152
153 $ilNavigationHistory = $DIC['ilNavigationHistory'];
154 $ilHelp = $DIC['ilHelp'];
155 $ilHelp->setScreenIdComponent('bibl');
156
157 // Navigation History
158 $link = $DIC->ctrl()->getLinkTarget($this, "render");
159
160 if ($this->object != null) {
161 $ilNavigationHistory->addItem($this->object->getRefId(), $link, "dcl");
162 }
163
164 // Direct-Link Resource, redirect to viewgui
165 if ($_GET[self::GET_DCL_GTR]) {
166 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class, 'tableview_id', $_GET[self::GET_VIEW_ID]);
167 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class, 'record_id', $_GET[self::GET_DCL_GTR]);
168 $DIC->ctrl()->redirectByClass(ilDclDetailedViewGUI::class, 'renderRecord');
169 }
170
171 $next_class = $DIC->ctrl()->getNextClass($this);
172 $cmd = $this->ctrl->getCmd();
173
174 if (!$this->getCreationMode() and $next_class != "ilinfoscreengui" and $cmd != 'infoScreen' and !$this->checkPermissionBool("read")) {
175 $DIC->ui()->mainTemplate()->loadStandardTemplate();
176 $DIC->ui()->mainTemplate()->setContent("Permission Denied.");
177
178 return;
179 }
180
181 switch ($next_class) {
182 case "ilinfoscreengui":
183 $this->prepareOutput();
184 $DIC->tabs()->activateTab("id_info");
185 $this->infoScreenForward();
186 break;
187
188 case "ilcommonactiondispatchergui":
190 $gui->enableCommentsSettings(false);
191 $this->ctrl->forwardCommand($gui);
192 break;
193
194 case "ilpermissiongui":
195 $this->prepareOutput();
196 $DIC->tabs()->activateTab("id_permissions");
197 $perm_gui = new ilPermissionGUI($this);
198 $this->ctrl->forwardCommand($perm_gui);
199 break;
200
201 case "ilobjectcopygui":
202 $cp = new ilObjectCopyGUI($this);
203 $cp->setType("dcl");
204 $DIC->ui()->mainTemplate()->loadStandardTemplate();
205 $this->ctrl->forwardCommand($cp);
206 break;
207
208 case "ildcltablelistgui":
209 $this->prepareOutput();
210 $DIC->tabs()->setTabActive("id_tables");
211 $tablelist_gui = new ilDclTableListGUI($this);
212 $this->ctrl->forwardCommand($tablelist_gui);
213 break;
214
215 case "ildclrecordlistgui":
216 $this->addHeaderAction(false);
217 $this->prepareOutput();
218 $DIC->tabs()->activateTab("id_records");
219 $this->ctrl->setParameterByClass(ilDclRecordListGUI::class, 'tableview_id', $_REQUEST['tableview_id']);
220 $recordlist_gui = new ilDclRecordListGUI($this, $this->table_id);
221 $this->ctrl->forwardCommand($recordlist_gui);
222 break;
223
224 case "ildclrecordeditgui":
225 $this->prepareOutput();
226 $DIC->tabs()->activateTab("id_records");
227 $recordedit_gui = new ilDclRecordEditGUI($this);
228 $this->ctrl->forwardCommand($recordedit_gui);
229 break;
230
231 case "ilobjfilegui":
232 $this->prepareOutput();
233 $DIC->tabs()->setTabActive("id_records");
234 $file_gui = new ilObjFile($this);
235 $this->ctrl->forwardCommand($file_gui);
236 break;
237
238 case "ilratinggui":
239 $rgui = new ilRatingGUI();
240 $rgui->setObject($_GET['record_id'], "dcl_record", $_GET["field_id"], "dcl_field");
241 $rgui->executeCommand();
242 $DIC->ctrl()->redirectByClass("ilDclRecordListGUI", "listRecords");
243 break;
244
245 case "ildcldetailedviewgui":
246 $this->prepareOutput();
247 $recordview_gui = new ilDclDetailedViewGUI($this);
248 $this->ctrl->forwardCommand($recordview_gui);
249 $DIC->tabs()->clearTargets();
250 $DIC->tabs()->setBackTarget($this->lng->txt("back"), $DIC->ctrl()->getLinkTargetByClass(ilDclRecordListGUI::class, ilDclRecordListGUI::CMD_LIST_RECORDS));
251 break;
252
253 case 'ilnotegui':
254 $this->prepareOutput();
255 $recordviewGui = new ilDclDetailedViewGUI($this);
256 $this->ctrl->forwardCommand($recordviewGui);
257 $DIC->tabs()->clearTargets();
258 $DIC->tabs()->setBackTarget($this->lng->txt("back"), $DIC->ctrl()->getLinkTarget($this, ""));
259 break;
260 case "ildclexportgui":
261 $this->prepareOutput();
262 $DIC->tabs()->setTabActive("export");
263 $exp_gui = new ilDclExportGUI($this);
264 $exporter = new ilDclContentExporter($this->object->getRefId());
265 $exp_gui->addFormat("xlsx", $this->lng->txt('dlc_xls_async_export'), $exporter, 'exportAsync');
266 $exp_gui->addFormat("xml");
267
268 $this->ctrl->forwardCommand($exp_gui);
269 break;
270
271 case strtolower(ilDclPropertyFormGUI::class):
272 $recordedit_gui = new ilDclRecordEditGUI($this);
273 $recordedit_gui->getRecord();
274 $recordedit_gui->initForm();
275 $form = $recordedit_gui->getForm();
276 $this->ctrl->forwardCommand($form);
277 break;
278
279 default:
280 switch ($cmd) {
281 case 'edit': // this is necessary because ilObjectGUI only calls its own editObject (why??)
282 $this->prepareOutput();
283 $this->editObject();
284 break;
285 default:
286 return parent::executeCommand();
287 }
288 }
289
290 return true;
291 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...
Export User Interface Class.
Class ilDclRecordEditGUI.
Class ilDclTableListGUI.
infoScreenForward()
show information screen
Class ilObjFile.
prepareOutput($a_show_subobjects=true)
prepare output
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilRatingGUI.

References $_GET, $DIC, ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermissionBool(), ilDclRecordListGUI\CMD_LIST_RECORDS, editObject(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreenForward(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ getDataCollectionObject()

ilObjDataCollectionGUI::getDataCollectionObject ( )
Returns
ilObjDataCollection

Definition at line 560 of file class.ilObjDataCollectionGUI.php.

561 {
562 $obj = new ilObjDataCollection($this->ref_id, true);
563
564 return $obj;
565 }
Class ilObjDataCollection.

Referenced by initEditForm().

+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

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

Reimplemented from ilObjectGUI.

Definition at line 573 of file class.ilObjDataCollectionGUI.php.

574 {
575 $a_values["is_online"] = $this->object->getOnline();
576 $a_values["rating"] = $this->object->getRating();
577 $a_values["public_notes"] = $this->object->getPublicNotes();
578 $a_values["approval"] = $this->object->getApproval();
579 $a_values["notification"] = $this->object->getNotification();
580
581 return $a_values;
582 }

◆ getStandardCmd()

ilObjDataCollectionGUI::getStandardCmd ( )
Returns
string

Definition at line 130 of file class.ilObjDataCollectionGUI.php.

131 {
132 return "render";
133 }

◆ getType()

ilObjDataCollectionGUI::getType ( )
Returns
string

Reimplemented from ilObject2GUI.

Definition at line 139 of file class.ilObjDataCollectionGUI.php.

140 {
141 return "dcl";
142 }

◆ infoScreen()

ilObjDataCollectionGUI::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 299 of file class.ilObjDataCollectionGUI.php.

300 {
301 $this->ctrl->setCmd("showSummary");
302 $this->ctrl->setCmdClass("ilinfoscreengui");
303 $this->infoScreenForward();
304 }

References infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjDataCollectionGUI::infoScreenForward ( )

show information screen

Definition at line 322 of file class.ilObjDataCollectionGUI.php.

323 {
324 global $DIC;
325 $ilTabs = $DIC['ilTabs'];
326 $ilErr = $DIC['ilErr'];
327
328 $ilTabs->activateTab("id_info");
329
330 if (!$this->checkPermissionBool("visible") && !$this->checkPermissionBool("read")) {
331 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
332 }
333
334 $info = new ilInfoScreenGUI($this);
335 $info->enablePrivateNotes();
336 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
337
338 $this->ctrl->forwardCommand($info);
339 }
Class ilInfoScreenGUI.

References $DIC, ilObjectGUI\$ilErr, and ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), and infoScreen().

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

◆ initCreationForms()

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

Reimplemented from ilObject2GUI.

Definition at line 395 of file class.ilObjDataCollectionGUI.php.

396 {
397 $forms = parent::initCreationForms($a_new_type);
398
399 return $forms;
400 }

◆ initEditForm()

ilObjDataCollectionGUI::initEditForm ( )
protected

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 495 of file class.ilObjDataCollectionGUI.php.

496 {
497 $this->tabs_gui->activateTab("id_settings");
498 $this->lng->loadLanguageModule($this->object->getType());
499
500 $form = new ilPropertyFormGUI();
501 $form->setFormAction($this->ctrl->getFormAction($this, "update"));
502 $form->setTitle($this->lng->txt($this->object->getType() . "_edit"));
503
504 // title
505 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
506 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
507 $ti->setMaxLength(ilObject::TITLE_LENGTH);
508 $ti->setRequired(true);
509 $form->addItem($ti);
510
511 // description
512 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
513 $ta->setCols(40);
514 $ta->setRows(2);
515 $form->addItem($ta);
516
517 // is_online
518 $cb = new ilCheckboxInputGUI($this->lng->txt("online"), "is_online");
519 $cb->setInfo($this->lng->txt("dcl_online_info"));
520 $form->addItem($cb);
521
522 // Notification
523 $cb = new ilCheckboxInputGUI($this->lng->txt("dcl_activate_notification"), "notification");
524 $cb->setInfo($this->lng->txt("dcl_notification_info"));
525 $form->addItem($cb);
526
527 //table order
528 $order_options = array();
529 foreach ($this->getDataCollectionObject()->getTables() as $table) {
530 $order_options[$table->getId()] = $table->getTitle();
531 }
532
533 // tile img upload
534 $section_appearance = new ilFormSectionHeaderGUI();
535 $section_appearance->setTitle($this->lng->txt('cont_presentation'));
536 $form->addItem($section_appearance);
537 $form = $this->object_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
538
539 $form->addCommandButton("update", $this->lng->txt("save"));
540
541 return $form;
542 }
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References getDataCollectionObject(), and ilObject\TITLE_LENGTH.

Referenced by editObject().

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

◆ listRecords()

ilObjDataCollectionGUI::listRecords ( )

called by goto

Definition at line 548 of file class.ilObjDataCollectionGUI.php.

549 {
550 global $DIC;
551 $ilCtrl = $DIC['ilCtrl'];
552 $ilCtrl->setParameterByClass("ildclrecordlistgui", "tableview_id", $_GET["tableview_id"]);
553 $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
554 }

References $_GET, and $DIC.

◆ render()

ilObjDataCollectionGUI::render ( )

show Content; redirect to ilDclRecordListGUI::listRecords

Definition at line 310 of file class.ilObjDataCollectionGUI.php.

311 {
312 global $DIC;
313 $ilCtrl = $DIC['ilCtrl'];
314 $this->ctrl->setParameterByClass('ilDclRecordListGUI', 'tableview_id', $_GET['tableview_id']);
315 $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
316 }

References $_GET, and $DIC.

◆ setTabs()

ilObjDataCollectionGUI::setTabs ( )

setTabs create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 419 of file class.ilObjDataCollectionGUI.php.

420 {
421 global $DIC;
422 $ilAccess = $DIC['ilAccess'];
423 $ilTabs = $DIC['ilTabs'];
424 $lng = $DIC['lng'];
425 $ilHelp = $DIC['ilHelp'];
426
427 $ilHelp->setScreenIdComponent("dcl");
428
429 // list records
430 if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
431 $ilTabs->addTab("id_records", $lng->txt("content"), $this->ctrl->getLinkTargetByClass("ildclrecordlistgui", "show"));
432 }
433
434 // info screen
435 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()) || $ilAccess->checkAccess('read', "", $this->object->getRefId())) {
436 $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
437 }
438
439 // settings
440 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
441 $ilTabs->addTab("id_settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, "editObject"));
442 }
443
444 // list tables
445 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
446 $ilTabs->addTab("id_tables", $lng->txt("dcl_tables"), $this->ctrl->getLinkTargetByClass("ildcltablelistgui", "listTables"));
447 }
448
449 // export
450 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
451 $ilTabs->addTab("export", $lng->txt("export"), $this->ctrl->getLinkTargetByClass("ildclexportgui", ""));
452 }
453
454 // edit permissions
455 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
456 $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
457 }
458 }

References $DIC, and ilObjectGUI\$lng.

◆ toggleNotification()

ilObjDataCollectionGUI::toggleNotification ( )

Definition at line 616 of file class.ilObjDataCollectionGUI.php.

617 {
618 global $DIC;
619 $ilCtrl = $DIC['ilCtrl'];
620 $ilUser = $DIC['ilUser'];
621
622 switch ($_GET["ntf"]) {
623 case 1:
625 break;
626 case 2:
628 break;
629 }
630 $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
631 }
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.

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

+ Here is the call graph for this function:

◆ updateCustom()

ilObjDataCollectionGUI::updateCustom ( ilPropertyFormGUI  $a_form)
Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjectGUI.

Definition at line 588 of file class.ilObjDataCollectionGUI.php.

589 {
590 $this->object->setOnline($a_form->getInput("is_online"));
591 $this->object->setRating($a_form->getInput("rating"));
592 $this->object->setPublicNotes($a_form->getInput("public_notes"));
593 $this->object->setApproval($a_form->getInput("approval"));
594 $this->object->setNotification($a_form->getInput("notification"));
595
596 $this->object_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
597
598 $this->emptyInfo();
599 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References emptyInfo(), and ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

Field Documentation

◆ $object

ilObjDataCollectionGUI::$object

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

◆ GET_DCL_GTR

const ilObjDataCollectionGUI::GET_DCL_GTR = "dcl_gtr"

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

Referenced by _goto().

◆ GET_REF_ID

const ilObjDataCollectionGUI::GET_REF_ID = "ref_id"

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

Referenced by _goto().

◆ GET_VIEW_ID

const ilObjDataCollectionGUI::GET_VIEW_ID = "tableview_id"

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

Referenced by _goto().


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