ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 setTabs ()
 setTabs create tabs (repository/workspace switch) 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)
 
 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 ()
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

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"
 
- 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)
 
 afterSave (ilObject $a_new_object)
 
 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 ()
 
 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...
 
 showMountWebfolderIcon ()
 
 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...
 

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

Detailed Description

Member Function Documentation

◆ _goto()

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

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

References $_GET, $id, and exit.

341  {
342  $id = explode("_", $a_target);
343 
344  $_GET["baseClass"] = "ilRepositoryGUI";
345  $_GET[self::GET_REF_ID] = $id[0]; // ref_id
346  $_GET[self::GET_VIEW_ID] = $id[1]; // view_id
347  $_GET[self::GET_DCL_GTR] = $id[2]; // record_id
348  $_GET["cmd"] = "listRecords";
349  require_once('./ilias.php');
350  exit;
351  }
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
exit
Definition: backend.php:16

◆ addHeaderAction()

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

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

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

546  {
547  global $DIC;
548  $ilUser = $DIC['ilUser'];
549  $ilAccess = $DIC['ilAccess'];
550  $tpl = $DIC['tpl'];
551  $lng = $DIC['lng'];
552  $ilCtrl = $DIC['ilCtrl'];
553 
554  $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, "dcl", $this->ref_id, $this->obj_id);
555 
556  ilObjectListGUI::prepareJSLinks(
557  $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
558  $ilCtrl->getLinkTargetByClass(
559  array(
560  "ilcommonactiondispatchergui",
561  "ilnotegui",
562  ),
563  "",
564  "",
565  true,
566  false
567  ),
568  $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
569  );
570 
571  $lg = $dispatcher->initHeaderAction();
572  //$lg->enableNotes(true);
573  //$lg->enableComments(ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()), false);
574 
575  // notification
576  if ($ilUser->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
578  //Command Activate Notification
579  $ilCtrl->setParameter($this, "ntf", 1);
580  $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_deactivate_dcl");
581 
582  $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.svg"), $lng->txt("dcl_notification_activated"));
583  } else {
584  //Command Deactivate Notification
585  $ilCtrl->setParameter($this, "ntf", 2);
586  $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_activate_dcl");
587 
588  $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.svg"), $lng->txt("dcl_notification_deactivated"));
589  }
590  $ilCtrl->setParameter($this, "ntf", "");
591  }
592 
593  if (!$a_redraw) {
594  $tpl->setHeaderActionMenu($lg->getHeaderAction());
595  } else {
596  return $lg->getHeaderAction();
597  }
598 
599  $tpl->setHeaderActionMenu($lg->getHeaderAction());
600  }
$lg
Definition: example_018.php:62
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$ilUser
Definition: imgupload.php:18
Class ilCommonActionDispatcherGUI.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjDataCollectionGUI::addLocatorItems ( )

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

References $DIC, and ilObject2GUI\$node_id.

327  {
328  global $DIC;
329  $ilLocator = $DIC['ilLocator'];
330 
331  if (is_object($this->object)) {
332  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
333  }
334  }
global $DIC
Definition: saml.php:7

◆ afterSave()

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

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

371  {
372  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
373  $this->ctrl->redirectByClass("ilDclTableListGUI", "listTables");
374  }

◆ emptyInfo()

ilObjDataCollectionGUI::emptyInfo ( )
private

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

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

Referenced by updateCustom().

509  {
510  global $DIC;
511  $lng = $DIC['lng'];
512  $this->table = ilDclCache::getTableCache($this->object->getFirstVisibleTableId());
513  $tables = $this->object->getTables();
514  if (count($tables) == 1 and count($this->table->getRecordFields()) == 0 and count($this->table->getRecords()) == 0
515  and $this->object->getOnline()
516  ) {
517  ilUtil::sendInfo($lng->txt("dcl_no_content_warning"), true);
518  }
519  }
global $DIC
Definition: saml.php:7
static getTableCache($table_id=0)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjDataCollectionGUI::executeCommand ( )
Returns
bool
Exceptions
ilCtrlException

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

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

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

◆ getDataCollectionObject()

ilObjDataCollectionGUI::getDataCollectionObject ( )
Returns
ilObjDataCollection

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

Referenced by initEditCustomForm().

469  {
470  $obj = new ilObjDataCollection($this->ref_id, true);
471 
472  return $obj;
473  }
Class ilObjDataCollection.
+ Here is the caller graph for this function:

◆ getEditFormCustomValues()

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

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

482  {
483  $a_values["is_online"] = $this->object->getOnline();
484  $a_values["rating"] = $this->object->getRating();
485  $a_values["public_notes"] = $this->object->getPublicNotes();
486  $a_values["approval"] = $this->object->getApproval();
487  $a_values["notification"] = $this->object->getNotification();
488 
489  return $a_values;
490  }

◆ getStandardCmd()

ilObjDataCollectionGUI::getStandardCmd ( )
Returns
string

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

122  {
123  return "render";
124  }

◆ getType()

ilObjDataCollectionGUI::getType ( )
Returns
string

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

131  {
132  return "dcl";
133  }

◆ 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 283 of file class.ilObjDataCollectionGUI.php.

References infoScreenForward().

284  {
285  $this->ctrl->setCmd("showSummary");
286  $this->ctrl->setCmdClass("ilinfoscreengui");
287  $this->infoScreenForward();
288  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjDataCollectionGUI::infoScreenForward ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreen().

307  {
308  global $DIC;
309  $ilTabs = $DIC['ilTabs'];
310  $ilErr = $DIC['ilErr'];
311 
312  $ilTabs->activateTab("id_info");
313 
314  if (!$this->checkPermissionBool("visible") && !$this->checkPermissionBool("read")) {
315  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
316  }
317 
318  $info = new ilInfoScreenGUI($this);
319  $info->enablePrivateNotes();
320  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
321 
322  $this->ctrl->forwardCommand($info);
323  }
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
$info
Definition: index.php:5
+ 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

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

360  {
361  $forms = parent::initCreationForms($a_new_type);
362 
363  return $forms;
364  }

◆ initEditCustomForm()

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

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

References $DIC, $table, ilPropertyFormGUI\addItem(), getDataCollectionObject(), and ilFormPropertyGUI\setInfo().

429  {
430  global $DIC;
431  $ilTabs = $DIC['ilTabs'];
432 
433  $ilTabs->activateTab("id_settings");
434 
435  // is_online
436  $cb = new ilCheckboxInputGUI($this->lng->txt("online"), "is_online");
437  $cb->setInfo($this->lng->txt("dcl_online_info"));
438  $a_form->addItem($cb);
439 
440  // Notification
441  $cb = new ilCheckboxInputGUI($this->lng->txt("dcl_activate_notification"), "notification");
442  $cb->setInfo($this->lng->txt("dcl_notification_info"));
443  $a_form->addItem($cb);
444 
445  //table order
446  $order_options = array();
447  foreach ($this->getDataCollectionObject()->getTables() as $table) {
448  $order_options[$table->getId()] = $table->getTitle();
449  }
450  }
global $DIC
Definition: saml.php:7
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ listRecords()

ilObjDataCollectionGUI::listRecords ( )

called by goto

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

References $_GET, $DIC, and $ilCtrl.

457  {
458  global $DIC;
459  $ilCtrl = $DIC['ilCtrl'];
460  $ilCtrl->setParameterByClass("ildclrecordlistgui", "tableview_id", $_GET["tableview_id"]);
461  $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
462  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ render()

ilObjDataCollectionGUI::render ( )

show Content; redirect to ilDclRecordListGUI::listRecords

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

References $_GET, $DIC, and $ilCtrl.

295  {
296  global $DIC;
297  $ilCtrl = $DIC['ilCtrl'];
298  $this->ctrl->setParameterByClass('ilDclRecordListGUI', 'tableview_id', $_GET['tableview_id']);
299  $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
300  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ setTabs()

ilObjDataCollectionGUI::setTabs ( )

setTabs create tabs (repository/workspace switch)

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

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

References $DIC, and ilObjectGUI\$lng.

384  {
385  global $DIC;
386  $ilAccess = $DIC['ilAccess'];
387  $ilTabs = $DIC['ilTabs'];
388  $lng = $DIC['lng'];
389  $ilHelp = $DIC['ilHelp'];
390 
391  $ilHelp->setScreenIdComponent("dcl");
392 
393  // list records
394  if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
395  $ilTabs->addTab("id_records", $lng->txt("content"), $this->ctrl->getLinkTargetByClass("ildclrecordlistgui", "show"));
396  }
397 
398  // info screen
399  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()) || $ilAccess->checkAccess('read', "", $this->object->getRefId())) {
400  $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
401  }
402 
403  // settings
404  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
405  $ilTabs->addTab("id_settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, "editObject"));
406  }
407 
408  // list tables
409  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
410  $ilTabs->addTab("id_tables", $lng->txt("dcl_tables"), $this->ctrl->getLinkTargetByClass("ildcltablelistgui", "listTables"));
411  }
412 
413  // export
414  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
415  $ilTabs->addTab("export", $lng->txt("export"), $this->ctrl->getLinkTargetByClass("ildclexportgui", ""));
416  }
417 
418  // edit permissions
419  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
420  $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
421  }
422  }
global $DIC
Definition: saml.php:7

◆ toggleNotification()

ilObjDataCollectionGUI::toggleNotification ( )

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

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

523  {
524  global $DIC;
525  $ilCtrl = $DIC['ilCtrl'];
526  $ilUser = $DIC['ilUser'];
527 
528  switch ($_GET["ntf"]) {
529  case 1:
531  break;
532  case 2:
534  break;
535  }
536  $ilCtrl->redirectByClass("ildclrecordlistgui", "show");
537  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ updateCustom()

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

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

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

497  {
498  $this->object->setOnline($a_form->getInput("is_online"));
499  $this->object->setRating($a_form->getInput("rating"));
500  $this->object->setPublicNotes($a_form->getInput("public_notes"));
501  $this->object->setApproval($a_form->getInput("approval"));
502  $this->object->setNotification($a_form->getInput("notification"));
503 
504  $this->emptyInfo();
505  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

Field Documentation

◆ GET_DCL_GTR

const ilObjDataCollectionGUI::GET_DCL_GTR = "dcl_gtr"

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

◆ GET_REF_ID

const ilObjDataCollectionGUI::GET_REF_ID = "ref_id"

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

◆ GET_VIEW_ID

const ilObjDataCollectionGUI::GET_VIEW_ID = "tableview_id"

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


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