ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjDataCollectionGUI Class Reference

Class ilObjDataCollectionGUI. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 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 ilDataCollectionRecordListGUI::listRecords More...
 
 infoScreenForward ()
 show information screen More...
 
 addLocatorItems ()
 
 _goto ($a_target)
 _goto Deep link More...
 
 setTabs ()
 setTabs create tabs (repository/workspace switch) More...
 
 addListFieldsTabs ($a_active)
 Add List Fields SubTabs. More...
 
 listRecords ()
 
 getDataCollectionObject ()
 
 getEditFormCustomValues (array &$a_values)
 getSettingsValues More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 updateSettings More...
 
 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 ()
 
 isVisible ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 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...
 

Protected Member Functions

 initCreationForms ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 initEditCustomForm 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...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 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)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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

- 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 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 Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjDataCollectionGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

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

References $_REQUEST, $ilCtrl, and ilObjectGUI\$lng.

35  {
36  global $lng, $ilCtrl;
37 
38  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
39 
40  $lng->loadLanguageModule("dcl");
41 
42  if(isset($_REQUEST['table_id']))
43  {
44  $this->table_id = $_REQUEST['table_id'];
45  }
46  elseif($a_id > 0)
47  {
48  $this->table_id = $this->object->getMainTableId();
49  }
50 
51  $ilCtrl->saveParameter($this, "table_id");
52  }
global $ilCtrl
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

Member Function Documentation

◆ _goto()

ilObjDataCollectionGUI::_goto (   $a_target)

_goto Deep link

Parameters
string$a_target

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

References $_GET, and exit.

311  {
312  $id = explode("_", $a_target);
313 
314  $_GET["baseClass"] = "ilRepositoryGUI";
315  $_GET["ref_id"] = $id[0];
316  $_GET["dcl_gtr"] = $id[1]; //recordID
317  $_GET["cmd"] = "listRecords";
318  include("ilias.php");
319  exit;
320  }
exit
Definition: login.php:54
$_GET["client_id"]

◆ addHeaderAction()

ilObjDataCollectionGUI::addHeaderAction (   $a_redraw = false)

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

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

544  {
545  global $ilUser, $ilAccess, $tpl, $lng, $ilCtrl;
546 
547  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
549  $ilAccess, "dcl", $this->ref_id,$this->obj_id);
550 
551  include_once "Services/Object/classes/class.ilObjectListGUI.php";
552  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
553  $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
554  $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
555 
556  $lg = $dispatcher->initHeaderAction();
557  //$lg->enableNotes(true);
558  //$lg->enableComments(ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()), false);
559 
560  // notification
561  if ($ilUser->getId() != ANONYMOUS_USER_ID && $this->object->getNotification() == 1)
562  {
563  include_once "./Services/Notification/classes/class.ilNotification.php";
565  {
566  //Command Activate Notification
567  $ilCtrl->setParameter($this, "ntf", 1);
568  $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_deactivate_dcl");
569 
570  $lg->addHeaderIcon("not_icon",
571  ilUtil::getImagePath("notification_on.png"),
572  $lng->txt("dcl_notification_activated"));
573  }
574  else
575  {
576  //Command Deactivate Notification
577  $ilCtrl->setParameter($this, "ntf", 2);
578  $lg->addCustomCommand($ilCtrl->getLinkTarget($this,"toggleNotification"), "dcl_notification_activate_dcl");
579 
580  $lg->addHeaderIcon("not_icon",
581  ilUtil::getImagePath("notification_off.png"),
582  $lng->txt("dcl_notification_deactivated"));
583  }
584  $ilCtrl->setParameter($this, "ntf", "");
585  }
586 
587  if(!$a_redraw)
588  {
589  $tpl->setHeaderActionMenu($lg->getHeaderAction());
590  }
591  else
592  {
593  return $lg->getHeaderAction();
594  }
595 
596  $tpl->setHeaderActionMenu($lg->getHeaderAction());
597  }
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
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)
global $ilUser
Definition: imgupload.php:15
Class ilCommonActionDispatcherGUI.
+ Here is the call graph for this function:

◆ addListFieldsTabs()

ilObjDataCollectionGUI::addListFieldsTabs (   $a_active)

Add List Fields SubTabs.

Parameters
string$a_active

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

References $ilCtrl, and ilObjectGUI\$lng.

Referenced by executeCommand().

412  {
413  global $ilTabs, $ilCtrl, $lng;
414 
415 
416  $ilTabs->addSubTab("list_fields",
417  $lng->txt("dcl_list_fields"),
418  $ilCtrl->getLinkTargetByClass("ildatacollectionfieldlistgui", "listFields"));
419 
420  $ilCtrl->setParameterByClass("ildatacollectionrecordviewviewdefinitiongui","table_id", $this->table_id);
421  $ilTabs->addSubTab("view_viewdefinition",
422  $lng->txt("dcl_record_view_viewdefinition"),
423  $ilCtrl->getLinkTargetByClass("ildatacollectionrecordviewviewdefinitiongui","edit"));
424 
425  $ilTabs->activateSubTab($a_active);
426  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjDataCollectionGUI::addLocatorItems ( )

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

References ilObject2GUI\$node_id.

295  {
296  global $ilLocator;
297 
298  if (is_object($this->object))
299  {
300  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
301  }
302  }

◆ afterSave()

ilObjDataCollectionGUI::afterSave ( ilObject  $a_new_object)
protected

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

References ilUtil\sendSuccess().

339  {
340  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
341  $this->ctrl->redirectByClass("ilDataCollectionFieldListGUI", "listFields");
342  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ emptyInfo()

ilObjDataCollectionGUI::emptyInfo ( )
private

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

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

Referenced by updateCustom().

512  {
513  global $lng;
514  $this->table = ilDataCollectionCache::getTableCache($this->object->getMainTableId());
515  $tables = $this->object->getTables();
516  if(count($tables) == 1 && count($this->table->getRecordFields()) == 0 && count($this->table->getRecords()) == 0 && $this->object->getOnline()){
517  ilUtil::sendInfo($lng->txt("dcl_no_content_warning"), true);
518  }
519  }
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 ( )

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

References $_GET, $_REQUEST, $cmd, $ilCtrl, $ilUser, $ret, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), addListFieldsTabs(), ilObject2GUI\checkPermissionBool(), ilObject2GUI\getCreationMode(), ilObjStyleSheet\getEffectiveContentStyleId(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreenForward(), and ilObject2GUI\prepareOutput().

74  {
75  global $ilCtrl, $ilTabs, $ilNavigationHistory, $ilUser, $tpl;
76 
77  // Navigation History
78  $link = $ilCtrl->getLinkTarget($this, "render");
79 
80  if($this->object != NULL)
81  {
82  $ilNavigationHistory->addItem($this->object->getRefId(), $link, "dcl");
83  }
84 
85  //Direct-Link Resource
86  if($_GET["dcl_gtr"])
87  {
88  $ilCtrl->setCmdClass("ildatacollectionrecordviewgui");
89  $_GET['record_id'] = $_GET["dcl_gtr"];
90  $ilCtrl->setCmd("renderRecord");
91  }
92 
93 
94  $next_class = $ilCtrl->getNextClass($this);
95  $cmd = $ilCtrl->getCmd();
96 
97 
98  if(!$this->getCreationMode() && $next_class != "ilinfoscreengui" && !$this->checkPermissionBool("read")){
99  $tpl->getStandardTemplate();
100  $tpl->setContent("Permission Denied.");
101  return;
102  }
103 
104 
105  switch($next_class)
106  {
107  case "ilinfoscreengui":
108  $this->prepareOutput();
109  $ilTabs->activateTab("id_info");
110  $this->infoScreenForward();
111  break;
112 
113  case "ilcommonactiondispatchergui":
114  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
116  $this->ctrl->forwardCommand($gui);
117  break;
118 
119  case "ilpermissiongui":
120  $this->prepareOutput();
121  $ilTabs->activateTab("id_permissions");
122  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
123  $perm_gui = new ilPermissionGUI($this);
124  $this->ctrl->forwardCommand($perm_gui);
125  break;
126 
127  case "ilobjectcopygui":
128  include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
129  $cp = new ilObjectCopyGUI($this);
130  $cp->setType("dcl");
131  $tpl->getStandardTemplate();
132  $this->ctrl->forwardCommand($cp);
133  break;
134 
135  case "ildatacollectionfieldlistgui":
136  $this->prepareOutput();
137  $this->addListFieldsTabs("list_fields");
138  $ilTabs->setTabActive("id_fields");
139  include_once("./Modules/DataCollection/classes/class.ilDataCollectionFieldListGUI.php");
140  $fieldlist_gui = new ilDataCollectionFieldListGUI($this, $this->table_id);
141  $this->ctrl->forwardCommand($fieldlist_gui);
142  break;
143 
144  case "ildatacollectiontableeditgui":
145  $this->prepareOutput();
146  $ilTabs->setTabActive("id_fields");
147  include_once("./Modules/DataCollection/classes/class.ilDataCollectionTableEditGUI.php");
148  $tableedit_gui = new ilDataCollectionTableEditGUI($this);
149  $this->ctrl->forwardCommand($tableedit_gui);
150  break;
151 
152  case "ildatacollectionfieldeditgui":
153  $this->prepareOutput();
154  $ilTabs->activateTab("id_fields");
155  include_once("./Modules/DataCollection/classes/class.ilDataCollectionFieldEditGUI.php");
156  $fieldedit_gui = new ilDataCollectionFieldEditGUI($this,$this->table_id,$_REQUEST["field_id"]);
157  $this->ctrl->forwardCommand($fieldedit_gui);
158  break;
159 
160  case "ildatacollectionrecordlistgui":
161  $this->addHeaderAction(false);
162  $this->prepareOutput();
163  $ilTabs->activateTab("id_records");
164  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordListGUI.php");
165  $recordlist_gui = new ilDataCollectionRecordListGUI($this,$this->table_id);
166  $this->ctrl->forwardCommand($recordlist_gui);
167  break;
168 
169  case "ildatacollectionrecordeditgui":
170  $this->prepareOutput();
171  $ilTabs->activateTab("id_records");
172  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordEditGUI.php");
173  $recordedit_gui = new ilDataCollectionRecordEditGUI($this);
174  $this->ctrl->forwardCommand($recordedit_gui);
175  break;
176 
177  case "ildatacollectionrecordviewviewdefinitiongui":
178  $this->prepareOutput();
179 
180  // page editor will set its own tabs
181  $ilTabs->clearTargets();
182  $ilTabs->setBackTarget($this->lng->txt("back"),
183  $ilCtrl->getLinkTargetByClass("ildatacollectionfieldlistgui", "listFields"));
184 
185  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinitionGUI.php");
186  $recordedit_gui = new ilDataCollectionRecordViewViewdefinitionGUI($this->table_id);
187 
188  // needed for editor
189  $recordedit_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "dcl"));
190 
191  if (!$this->checkPermissionBool("write"))
192  {
193  $recordedit_gui->setEnableEditing(false);
194  }
195 
196  $ret = $this->ctrl->forwardCommand($recordedit_gui);
197  if ($ret != "")
198  {
199  $this->tpl->setContent($ret);
200  }
201 
202  $ilTabs->removeTab('history');
203  $ilTabs->removeTab('clipboard'); // Fixme
204  $ilTabs->removeTab('pg');
205  break;
206 
207  case "ildatacollectionrecordlistviewdefinitiongui":
208  $this->prepareOutput();
209  $this->addListFieldsTabs("list_viewdefinition");
210  $ilTabs->setTabActive("id_fields");
211  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordListViewdefinitionGUI.php");
212  $recordlist_gui = new ilDataCollectionRecordListViewdefinitionGUI($this, $this->table_id);
213  $this->ctrl->forwardCommand($recordlist_gui);
214  break;
215 
216  case "ilobjfilegui":
217  $this->prepareOutput();
218  $ilTabs->setTabActive("id_records");
219  include_once("./Modules/File/classes/class.ilObjFile.php");
220  $file_gui = new ilObjFile($this);
221  $this->ctrl->forwardCommand($file_gui);
222  break;
223 
224  case "ildatacollectionrecordviewgui":
225  $this->prepareOutput();
226  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordViewGUI.php");
227  $recordview_gui = new ilDataCollectionRecordViewGUI($this);
228  $this->ctrl->forwardCommand($recordview_gui);
229  $ilTabs->clearTargets();
230  $ilTabs->setBackTarget($this->lng->txt("back"), $ilCtrl->getLinkTargetByClass("ilObjDataCollectionGUI", ""));
231  break;
232 
233  case "ilratinggui":
234  $rgui = new ilRatingGUI();
235  $rgui->setObject($_GET['record_id'], "dcl_record", $_GET["field_id"], "dcl_field");
236  $rgui->executeCommand();
237  $ilCtrl->redirectByClass("ilDataCollectionRecordListGUI", "listRecords");
238  break;
239 
240  default:
241  return parent::executeCommand();
242  }
243 
244  return true;
245  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
GUI class for the workflow of copying objects.
addListFieldsTabs($a_active)
Add List Fields SubTabs.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
Class ilDataCollectionRecordViewGUI.
Class ilDataCollectionFieldListGUI.
global $ilCtrl
Definition: ilias.php:18
Class ilRatingGUI.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
Class ilObjFile.
Class ilDataCollectionFieldEditGUI.
global $ilUser
Definition: imgupload.php:15
Class ilDataCollectionRecordEditGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
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 ( )

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

476  {
477  $obj = new ilObjDataCollection($this->ref_id, true);
478 
479  return $obj;
480  }
Class ilObjDataCollection.

◆ getEditFormCustomValues()

ilObjDataCollectionGUI::getEditFormCustomValues ( array &  $a_values)

getSettingsValues

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

486  {
487  $a_values["is_online"] = $this->object->getOnline();
488  $a_values["rating"] = $this->object->getRating();
489  $a_values["public_notes"] = $this->object->getPublicNotes();
490  $a_values["approval"] = $this->object->getApproval();
491  $a_values["notification"] = $this->object->getNotification();
492 
493  return $a_values;
494  }

◆ getStandardCmd()

ilObjDataCollectionGUI::getStandardCmd ( )

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

58  {
59  return "render";
60  }

◆ getType()

ilObjDataCollectionGUI::getType ( )

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

66  {
67  return "dcl";
68  }

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

References infoScreenForward().

253  {
254  $this->ctrl->setCmd("showSummary");
255  $this->ctrl->setCmdClass("ilinfoscreengui");
256  $this->infoScreenForward();
257  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjDataCollectionGUI::infoScreenForward ( )

show information screen

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

References $ilErr, and ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), and infoScreen().

273  {
274  global $ilTabs, $ilErr;
275 
276  $ilTabs->activateTab("id_info");
277 
278  if (!$this->checkPermissionBool("visible"))
279  {
280  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
281  }
282 
283  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
284  $info = new ilInfoScreenGUI($this);
285  $info->enablePrivateNotes();
286  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
287 
288  $this->ctrl->forwardCommand($info);
289  }
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjDataCollectionGUI::initCreationForms (   $a_new_type)
protected

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

326  {
327  $forms = parent::initCreationForms($a_new_type);
328 
329  // disabling import
330  unset($forms[self::CFORM_IMPORT]);
331 
332  return $forms;
333  }

◆ initEditCustomForm()

ilObjDataCollectionGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

initEditCustomForm

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

References $ilCtrl, $ilErr, and ilPropertyFormGUI\addItem().

433  {
434  global $ilCtrl, $ilErr, $ilTabs;
435 
436  $ilTabs->activateTab("id_settings");
437 
438  // is_online
439  $cb = new ilCheckboxInputGUI($this->lng->txt("online"), "is_online");
440  $a_form->addItem($cb);
441 
442  // edit_type
443 
444  // Rating
445  //$cb = new ilCheckboxInputGUI($this->lng->txt("dcl_activate_rating"), "rating");
446  //$a_form->addItem($cb);
447 
448  // Public Notes
449  //$cb = new ilCheckboxInputGUI($this->lng->txt("public_notes"), "public_notes");
450  //$a_form->addItem($cb);
451 
452  // Approval
453  //$cb = new ilCheckboxInputGUI($this->lng->txt("dcl_activate_approval"), "approval");
454  //$a_form->addItem($cb);
455 
456  // Notification
457  $cb = new ilCheckboxInputGUI($this->lng->txt("dcl_activate_notification"), "notification");
458  $a_form->addItem($cb);
459 
460  }
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ listRecords()

ilObjDataCollectionGUI::listRecords ( )

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

References $ilCtrl.

466  {
467  global $ilCtrl;
468 
469  $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
470  }
global $ilCtrl
Definition: ilias.php:18

◆ render()

ilObjDataCollectionGUI::render ( )

show Content; redirect to ilDataCollectionRecordListGUI::listRecords

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

References $ilCtrl.

263  {
264  global $ilCtrl;
265 
266  $ilCtrl->redirectByClass("ildatacollectionrecordlistgui","listRecords");
267  }
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 350 of file class.ilObjDataCollectionGUI.php.

References ilObjectGUI\$lng.

351  {
352  global $ilAccess, $ilTabs, $lng, $ilHelp;
353 
354  $ilHelp->setScreenIdComponent("dcl");
355 
356  // list records
357  if ($ilAccess->checkAccess('read', "", $this->object->getRefId()))
358  {
359  $ilTabs->addTab("id_records",
360  $lng->txt("content"),
361  $this->ctrl->getLinkTargetByClass("ildatacollectionrecordlistgui", "listRecords"));
362  }
363 
364  // info screen
365  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()))
366  {
367  $ilTabs->addTab("id_info",
368  $lng->txt("info_short"),
369  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
370  }
371 
372  // settings
373  if ($ilAccess->checkAccess('write', "", $this->object->getRefId()))
374  {
375  $ilTabs->addTab("id_settings",
376  $lng->txt("settings"),
377  $this->ctrl->getLinkTarget($this, "editObject"));
378  }
379 
380  // list fields
381  if ($ilAccess->checkAccess('write', "", $this->object->getRefId()))
382  {
383  $ilTabs->addTab("id_fields",
384  $lng->txt("dcl_list_fields"),
385  $this->ctrl->getLinkTargetByClass("ildatacollectionfieldlistgui", "listFields"));
386  }
387 
388  // export
389  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
390  {
391  //$ilTabs->addTab("export",
392  //$lng->txt("export"),
393  //$this->ctrl->getLinkTargetByClass("ilexportgui", ""));
394  }
395 
396  // edit permissions
397  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
398  {
399  $ilTabs->addTab("id_permissions",
400  $lng->txt("perm_settings"),
401  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
402  }
403  }

◆ toggleNotification()

ilObjDataCollectionGUI::toggleNotification ( )

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

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

524  {
525  global $ilCtrl, $ilUser;
526 
527  include_once "./Services/Notification/classes/class.ilNotification.php";
528  switch($_GET["ntf"])
529  {
530  case 1:
532  break;
533  case 2:
535  break;
536  }
537  $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
538  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ updateCustom()

ilObjDataCollectionGUI::updateCustom ( ilPropertyFormGUI  $a_form)

updateSettings

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

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

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

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