ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjDataCollectionGUI Class Reference

@ilCtrl_Calls ilObjDataCollectionGUI: ilInfoScreenGUI, ilNoteGUI, ilCommonActionDispatcherGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilPermissionGUI, ilObjectCopyGUI, ilExportGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilDclRecordListGUI, ilDclRecordEditGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilDclDetailedViewGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilDclTableListGUI, ilObjFileGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilObjUserGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilRatingGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilPropertyFormGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilDclPropertyFormGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilObjectMetaDataGUI @ilCtrl_Calls ilObjDataCollectionGUI: ilObjectContentStyleSettingsGUI More...

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

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getObjectId ()
 
 getStandardCmd ()
 
 getType ()
 Functions that must be overwritten. More...
 
 executeCommand ()
 execute command More...
 
 infoScreen ()
 
 render ()
 
 infoScreenForward ()
 
 edit ()
 
 update ()
 
 listRecords ()
 
 getDataCollectionObject ()
 
 activateNotification ()
 
 deactivateNotification ()
 
 editNotification ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const GET_REF_ID = 'ref_id'
 
const GET_TABLE_ID = 'table_id'
 
const GET_VIEW_ID = 'tableview_id'
 
const GET_RECORD_ID = 'record_id'
 
const TAB_EDIT_DCL = 'settings'
 
const TAB_LIST_TABLES = 'dcl_tables'
 
const TAB_META_DATA = 'meta_data'
 
const TAB_EXPORT = 'export'
 
const TAB_LIST_PERMISSIONS = 'perm_settings'
 
const TAB_INFO = 'info_short'
 
const TAB_CONTENT = 'content'
 
ilObject $object = null
 
- 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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 handleExport (bool $do_default=false)
 
 handleExportAsync ()
 
 getTableViewId ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 initForm ()
 
 setEditTabs ()
 
 addHeaderAction ()
 Add header action menu. More...
 
 getNotificationModal ()
 
- 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 addAdminLocatorItems (bool $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 (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
int $table_id
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 setTableId (int $objectOrRefId=0)
 
 addJavaScript ()
 
 addTab (string $langKey, string $link)
 

Private Attributes

ilDclNotification $notification_settings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilObject2GUI.

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

61 {
62 global $DIC;
63
64 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
65
66 $this->tabs = $DIC->tabs();
67 $this->notification_settings = new ilDclNotification($DIC->database());
68
69 $this->lng->loadLanguageModule('dcl');
70 $this->lng->loadLanguageModule('content');
71 $this->lng->loadLanguageModule('obj');
72 $this->lng->loadLanguageModule('cntr');
73
74 $this->setTableId($this->getRefId());
75
76 if (!$this->ctrl->isAsynch()) {
77 $this->addJavaScript();
78 }
79
80 $this->ctrl->saveParameter($this, 'table_id');
81 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), addJavaScript(), ILIAS\Repository\ctrl(), ilObjectGUI\getRefId(), ILIAS\Repository\lng(), setTableId(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjDataCollectionGUI::_goto ( string  $a_target)
static

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

351 : void
352 {
353 global $DIC;
354 $lng = $DIC->language();
355
356 $ctrl = $DIC->ctrl();
357 $access = $DIC->access();
358 $tpl = $DIC->ui()->mainTemplate();
359
361 $values = array_combine($values, array_pad(explode('_', $a_target), count($values), 0));
362
363 $ref_id = (int) $values[self::GET_REF_ID];
364
365 if ($access->checkAccess('read', '', $ref_id)) {
366 $ctrl->setParameterByClass(ilRepositoryGUI::class, self::GET_REF_ID, $ref_id);
368 $table_id = (int) $values[self::GET_TABLE_ID];
369 if ($table_id !== 0 && isset($object->getVisibleTables()[$table_id])) {
370 $ctrl->setParameterByClass(ilObjDataCollectionGUI::class, self::GET_TABLE_ID, $table_id);
371 $table = $object->getVisibleTables()[$table_id];
372 $view_id = (int) $values[self::GET_VIEW_ID];
373 if ($view_id !== 0 && isset($table->getTableViews()[$view_id])) {
374 $ctrl->setParameterByClass(ilObjDataCollectionGUI::class, self::GET_VIEW_ID, $view_id);
375 }
376 $record_id = (int) $values[self::GET_RECORD_ID];
377 if ($record_id !== 0 && isset($table->getRecords()[$record_id])) {
378 $ctrl->setParameterByClass(ilDclDetailedViewGUI::class, self::GET_RECORD_ID, $record_id);
379 $ctrl->redirectByClass([ilRepositoryGUI::class, self::class, ilDclDetailedViewGUI::class], 'renderRecord');
380 }
381 }
382 $ctrl->redirectByClass([ilRepositoryGUI::class, self::class, ilDclRecordListGUI::class], 'listRecords');
383 } elseif ($access->checkAccess('visbile', '', $ref_id)) {
384 ilObjectGUI::_gotoRepositoryNode((int) $a_target, 'infoScreen');
385 } else {
386 $message = sprintf(
387 $lng->txt('msg_no_perm_read_item'),
389 );
390 $tpl->setOnScreenMessage('failure', $message, true);
391
393 }
394 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilAccessHandler $access
ilGlobalTemplateInterface $tpl
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
$message
Definition: xapiexit.php:31

References ilObject2GUI\$access, $ctrl, $DIC, $lng, $message, $object, ilObjectGUI\$ref_id, $table_id, ilObject2GUI\$tpl, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRBACAccessHandler\checkAccess(), GET_RECORD_ID, GET_REF_ID, GET_TABLE_ID, GET_VIEW_ID, ILIAS\Repository\int(), ilCtrl\redirectByClass(), ILIAS\UICore\GlobalTemplate\setOnScreenMessage(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ activateNotification()

ilObjDataCollectionGUI::activateNotification ( )
final

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

534 : void
535 {
537 foreach (ilDclNotificationType::cases() as $notification) {
538 $this->notification_settings->add($this->object, $this->user, $notification);
539 }
540 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
541 }
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.

References ILIAS\Repository\ctrl(), ilNotification\setNotification(), ilNotification\TYPE_DATA_COLLECTION, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ addHeaderAction()

ilObjDataCollectionGUI::addHeaderAction ( )
protected

Add header action menu.

Reimplemented from ilObjectGUI.

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

563 : void
564 {
566 $this->ctrl->getLinkTarget($this, 'redrawHeaderAction', '', true),
567 '',
568 $this->ctrl->getLinkTargetByClass([ilCommonActionDispatcherGUI::class, ilTaggingGUI::class], '', '', true)
569 );
570
571 $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $this->access, 'dcl', $this->ref_id, $this->obj_id);
572
573 $lg = $dispatcher->initHeaderAction();
574
575 if ($this->user->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
577 $lg->addCustomCommandButton(
578 $this->ui_factory->button()->shy(
579 $this->lng->txt('dcl_notification_deactivate'),
580 $this->ctrl->getLinkTarget($this, 'deactivateNotification')
581 )
582 );
583 $modal = $this->getNotificationModal();
584 $lg->addCustomCommandButton(
585 $this->ui_factory->button()->shy(
586 $this->lng->txt('dcl_notification_settings'),
587 $modal->getShowSignal()
588 ),
589 $modal
590 );
591 $lg->addHeaderIcon('not_icon', ilUtil::getImagePath('object/notification_on.svg'), $this->lng->txt('dcl_notification_activated'));
592 } else {
593 $lg->addCustomCommandButton(
594 $this->ui_factory->button()->shy(
595 $this->lng->txt('dcl_notification_activate'),
596 $this->ctrl->getLinkTarget($this, 'activateNotification')
597 )
598 );
599 $lg->addHeaderIcon('not_icon', ilUtil::getImagePath('object/notification_off.svg'), $this->lng->txt('dcl_notification_deactivated'));
600 }
601 $this->ctrl->setParameter($this, 'ntf', '');
602 }
603
604 $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
605 }
Class ilCommonActionDispatcherGUI.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ?ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const ANONYMOUS_USER_ID
Definition: constants.php:27

References ILIAS\Repository\access(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), getNotificationModal(), ilNotification\hasNotification(), ILIAS\Repository\lng(), ilObjectListGUI\prepareJsLinks(), ilNotification\TYPE_DATA_COLLECTION, ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\user().

Referenced by executeCommand().

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

◆ addJavaScript()

ilObjDataCollectionGUI::addJavaScript ( )
private

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

104 : void
105 {
106 $this->tpl->addJavaScript('assets/js/datacollection.js');
107 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjDataCollectionGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

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

340 : void
341 {
342 if (is_object($this->object) === true) {
343 $this->locator->addItem(
344 $this->object->getTitle(),
345 $this->ctrl->getLinkTarget($this, ''),
346 (string) $this->object->getRefId()
347 );
348 }
349 }

References ILIAS\Repository\locator(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addTab()

ilObjDataCollectionGUI::addTab ( string  $langKey,
string  $link 
)
private

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

429 : void
430 {
431 $this->tabs->addTab($langKey, $this->lng->txt($langKey), $link);
432 }

References ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by setTabs().

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

◆ afterSave()

ilObjDataCollectionGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

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

396 : void
397 {
398 $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
399 $this->ctrl->redirectByClass(ilDclTableListGUI::class, 'listTables');
400 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ deactivateNotification()

ilObjDataCollectionGUI::deactivateNotification ( )
final

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

543 : void
544 {
545 ilNotification::setNotification(ilNotification::TYPE_DATA_COLLECTION, $this->user->getId(), $this->obj_id, false);
546 $this->notification_settings->clear($this->object, $this->user);
547 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
548 }

References ILIAS\Repository\ctrl(), ilNotification\setNotification(), ilNotification\TYPE_DATA_COLLECTION, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ edit()

ilObjDataCollectionGUI::edit ( )

Reimplemented from ilObject2GUI.

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

471 : void
472 {
473 if (!$this->checkPermissionBool('write')) {
474 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('permission_denied'));
475 }
476
477 $this->setEditTabs();
478 $this->tabs->activateTab(self::TAB_EDIT_DCL);
479
480 $this->tpl->setContent($this->ui_renderer->render($this->initForm()));
481 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)

References ilObject2GUI\checkPermissionBool(), ILIAS\Repository\lng(), setEditTabs(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ editNotification()

ilObjDataCollectionGUI::editNotification ( )
final

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

550 : void
551 {
552 if ($data = $this->getNotificationModal()->withRequest($this->request)->getData()) {
553 $this->notification_settings->clear($this->object, $this->user);
554 foreach (ilDclNotificationType::cases() as $notification) {
555 if ($data[$notification->value]) {
556 $this->notification_settings->add($this->object, $this->user, $notification);
557 }
558 }
559 }
560 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
561 }

References ilObjectGUI\$data, ILIAS\Repository\ctrl(), getNotificationModal(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjDataCollectionGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

119 : void
120 {
121 global $DIC;
122
123 $ilNavigationHistory = $DIC['ilNavigationHistory'];
124 $DIC->help()->setScreenIdComponent('dcl');
125 $link = $this->ctrl->getLinkTarget($this, 'render');
126
127 if ($this->getObject() !== null) {
128 $ilNavigationHistory->addItem($this->object->getRefId(), $link, 'dcl');
129 }
130
131 $next_class = $this->ctrl->getNextClass($this);
132 $cmd = $this->ctrl->getCmd();
133
134 if (!$this->getCreationMode() && $next_class != 'ilinfoscreengui' && $cmd !== 'infoScreen' && !$this->checkPermissionBool('read')) {
135 $DIC->ui()->mainTemplate()->loadStandardTemplate();
136 $DIC->ui()->mainTemplate()->setContent('Permission Denied.');
137 return;
138 }
139
140 switch ($next_class) {
141 case strtolower(ilInfoScreenGUI::class):
142 $this->prepareOutput();
143 $this->tabs->activateTab(self::TAB_INFO);
144 $this->infoScreenForward();
145 break;
146 case strtolower(ilCommonActionDispatcherGUI::class):
147 $this->prepareOutput();
149 $gui->enableCommentsSettings(false);
150 $this->ctrl->forwardCommand($gui);
151 break;
152 case strtolower(ilPermissionGUI::class):
153 $this->prepareOutput();
154 $this->tabs->activateTab(self::TAB_LIST_PERMISSIONS);
155 $perm_gui = new ilPermissionGUI($this);
156 $this->ctrl->forwardCommand($perm_gui);
157 break;
158 case strtolower(ilObjectCopyGUI::class):
159 $cp = new ilObjectCopyGUI($this);
160 $cp->setType('dcl');
161 $DIC->ui()->mainTemplate()->loadStandardTemplate();
162 $this->ctrl->forwardCommand($cp);
163 break;
164 case strtolower(ilDclTableListGUI::class):
165 $this->prepareOutput();
166 $this->tabs->activateTab(self::TAB_LIST_TABLES);
167 $tablelist_gui = new ilDclTableListGUI($this);
168 $this->ctrl->forwardCommand($tablelist_gui);
169 break;
170 case strtolower(ilDclRecordListGUI::class):
171 $this->addHeaderAction();
172 $this->prepareOutput();
173 $this->tabs->activateTab(self::TAB_CONTENT);
174 try {
175 $recordlist_gui = new ilDclRecordListGUI($this, $this->table_id, $this->getTableViewId());
176 $this->ctrl->forwardCommand($recordlist_gui);
177 } catch (ilDclNoTableviewException $e) {
178 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
179 }
180 break;
181 case strtolower(ilDclRecordEditGUI::class):
182 $this->prepareOutput();
183 $this->tabs->activateTab(self::TAB_CONTENT);
184 $recordedit_gui = new ilDclRecordEditGUI($this, $this->table_id, $this->getTableViewId());
185 $this->ctrl->forwardCommand($recordedit_gui);
186 break;
187 case strtolower(ilObjFileGUI::class):
188 $this->prepareOutput();
189 $this->tabs->activateTab(self::TAB_CONTENT);
190 $file_gui = new ilObjFile($this->getRefId());
191 $this->ctrl->forwardCommand($file_gui);
192 break;
193 case strtolower(ilRatingGUI::class):
194 $rgui = new ilRatingGUI();
195
196 $record_id = $this->http->wrapper()->query()->retrieve('record_id', $this->refinery->kindlyTo()->int());
197 $field_id = $this->http->wrapper()->query()->retrieve('field_id', $this->refinery->kindlyTo()->int());
198
199 $rgui->setObject($record_id, 'dcl_record', $field_id, 'dcl_field');
200 $rgui->executeCommand();
201
202 $detail = $this->http->wrapper()->query()->retrieve('detail_view', $this->refinery->kindlyTo()->bool());
203 $this->ctrl->setParameterByClass(
204 $detail ? ilDclDetailedViewGUI::class : ilDclRecordListGUI::class,
205 'tableview_id',
206 $this->http->wrapper()->query()->retrieve('tableview_id', $this->refinery->kindlyTo()->int())
207 );
208 if ($detail) {
209 $this->ctrl->setParameterByClass(
210 ilDclDetailedViewGUI::class,
211 'record_id',
212 $this->http->wrapper()->query()->retrieve('record_id', $this->refinery->kindlyTo()->int())
213 );
214 $this->ctrl->redirectByClass([ilRepositoryGUI::class, self::class, ilDclDetailedViewGUI::class], 'renderRecord');
215 } else {
216 $this->listRecords();
217 }
218 break;
219 case strtolower(ilDclDetailedViewGUI::class):
220 $this->prepareOutput();
221 $recordview_gui = new ilDclDetailedViewGUI($this, $this->getTableViewId());
222 $this->ctrl->forwardCommand($recordview_gui);
223 $this->tabs->setBackTarget(
224 $this->lng->txt('back'),
225 $this->ctrl->getLinkTargetByClass(
226 ilDclRecordListGUI::class,
228 )
229 );
230 break;
231 case strtolower(ilNoteGUI::class):
232 $this->prepareOutput();
233 $recordviewGui = new ilDclDetailedViewGUI($this, $this->getTableViewId());
234 $this->ctrl->forwardCommand($recordviewGui);
235 $this->tabs->clearTargets();
236 $this->tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, ''));
237 break;
238 case strtolower(ilExportGUI::class):
239 $this->prepareOutput();
240 $this->handleExport();
241 break;
242 case strtolower(ilDclPropertyFormGUI::class):
243 $recordedit_gui = new ilDclRecordEditGUI($this, $this->table_id, $this->getTableViewId());
244 $recordedit_gui->getRecord();
245 $recordedit_gui->initForm();
246 $form = $recordedit_gui->getForm();
247 $this->ctrl->forwardCommand($form);
248 break;
249 case strtolower(ilObjectMetaDataGUI::class):
250 $this->checkPermission('write');
251 $this->prepareOutput();
252 $this->tabs->activateTab(self::TAB_META_DATA);
253 $gui = new ilObjectMetaDataGUI($this->object);
254 $this->ctrl->forwardCommand($gui);
255 break;
256 case strtolower(ilObjectContentStyleSettingsGUI::class):
257 $this->prepareOutput();
258 $this->setEditTabs();
259 $this->tabs->activateTab('settings');
260 $this->tabs->activateSubTab('cont_style');
261 global $DIC;
262 $settings_gui = $DIC->contentStyle()->gui()->objectSettingsGUIForRefId(null, $this->ref_id);
263 $this->ctrl->forwardCommand($settings_gui);
264 break;
265 default:
266 parent::executeCommand();
267 }
268 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
@ilCtrl_Calls ilDclDetailedViewGUI: ilDclDetailedViewDefinitionGUI, ilEditClipboardGUI,...
@ilCtrl_Calls ilDclTableListGUI: ilDclFieldListGUI, ilDclFieldEditGUI, ilDclTableViewGUI,...
addHeaderAction()
Add header action menu.
handleExport(bool $do_default=false)
Class ilObjFile.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
prepareOutput(bool $show_sub_objects=true)
GUI class for the workflow of copying objects.
Class ilObjectMetaDataGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.

References $DIC, Vendor\Package\$e, addHeaderAction(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ilDclRecordListGUI\CMD_LIST_RECORDS, ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\getObject(), ilObjectGUI\getRefId(), getTableViewId(), handleExport(), ILIAS\FileDelivery\http(), infoScreenForward(), listRecords(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObject2GUI\prepareOutput(), ILIAS\Repository\refinery(), setEditTabs(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ getDataCollectionObject()

ilObjDataCollectionGUI::getDataCollectionObject ( )

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

530 {
531 return new ilObjDataCollection($this->ref_id, true);
532 }

◆ getNotificationModal()

ilObjDataCollectionGUI::getNotificationModal ( )
protected

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

607 : RoundTrip
608 {
609 return $this->ui_factory->modal()->roundtrip(
610 $this->lng->txt('dcl_notification_settings'),
611 null,
612 [
613 ilDclNotificationType::RECORD_CREATE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_new_entries'))
614 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_CREATE)),
615 ilDclNotificationType::RECORD_UPDATE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_updated_entries'))
616 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_UPDATE)),
617 ilDclNotificationType::RECORD_DELETE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_deleted_entries'))
618 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_DELETE)),
619 ],
620 $this->ctrl->getLinkTarget($this, 'editNotification')
621 );
622 }

References ILIAS\Repository\lng(), and RECORD_DELETE.

Referenced by addHeaderAction(), and editNotification().

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

◆ getObjectId()

ilObjDataCollectionGUI::getObjectId ( )

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

99 : int
100 {
101 return $this->obj_id;
102 }

References ilObjectGUI\$obj_id.

◆ getStandardCmd()

ilObjDataCollectionGUI::getStandardCmd ( )

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

109 : string
110 {
111 return 'render';
112 }

◆ getTableViewId()

ilObjDataCollectionGUI::getTableViewId ( )
protected

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

290 : int
291 {
292 $tableview_id = null;
293 if ($this->http->wrapper()->query()->has('tableview_id')) {
294 $tableview_id = $this->http->wrapper()->query()->retrieve(
295 'tableview_id',
296 $this->refinery->kindlyTo()->int()
297 );
298 }
299 if ($this->http->wrapper()->post()->has('tableview_id')) {
300 $tableview_id = $this->http->wrapper()->post()->retrieve(
301 'tableview_id',
302 $this->refinery->kindlyTo()->int()
303 );
304 }
305 if (!$tableview_id) {
306 $table_obj = ilDclCache::getTableCache($this->table_id);
307 $tableview_id = $table_obj->getFirstTableViewId();
308 }
309 if ($tableview_id === null) {
310 throw new ilDclNoTableviewException('No visible tableview configured!');
311 }
312 return $tableview_id;
313 }
static getTableCache(?int $table_id=null)

References ilDclCache\getTableCache(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by executeCommand().

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

◆ getType()

ilObjDataCollectionGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

114 : string
115 {
117 }

References ilObjDataCollection\TYPE.

◆ handleExport()

ilObjDataCollectionGUI::handleExport ( bool  $do_default = false)
protected

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

270 : void
271 {
272 $this->tabs->setTabActive(self::TAB_EXPORT);
273 $exp_gui = new ilExportGUI($this);
274 if ($do_default) {
275 $exp_gui->listExportFiles();
276 } else {
277 $this->ctrl->forwardCommand($exp_gui);
278 }
279 }
Export User Interface Class.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

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

◆ handleExportAsync()

ilObjDataCollectionGUI::handleExportAsync ( )
protected

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

281 : void
282 {
283 $this->tabs->setTabActive(self::TAB_EXPORT);
284 $exp_gui = new ilExportGUI($this);
285 $exporter = new ilDclContentExporter($this->object->getRefId(), null);
286 $exporter->exportAsync();
287 $this->ctrl->redirect($exp_gui);
288 }
Hook-Class for exporting data-collections (used in SOAP-Class) This Class avoids duplicated code by r...

References ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjDataCollectionGUI::infoScreen ( )

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

315 : void
316 {
317 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
318 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjDataCollectionGUI::infoScreenForward ( )

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

325 : void
326 {
327 $this->tabs->activateTab(self::TAB_INFO);
328
329 if (!$this->checkPermissionBool('visible')) {
330 $this->checkPermission('read');
331 }
332
333 $info = new ilInfoScreenGUI($this);
334 $info->enablePrivateNotes();
335 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
336
337 $this->ctrl->forwardCommand($info);
338 }
Class ilInfoScreenGUI.
$info
Definition: entry_point.php:21

References $info, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

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

◆ initForm()

ilObjDataCollectionGUI::initForm ( )
protected

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

434 : Form
435 {
436 $inputs = [];
437
438 $edit = [];
439 $edit['title'] = $this->ui_factory->input()->field()->text($this->lng->txt('title'))->withRequired(true);
440 $edit['description'] = $this->ui_factory->input()->field()->textarea($this->lng->txt('description'));
441 $edit['notification'] = $this->ui_factory->input()->field()->checkbox(
442 $this->lng->txt('dcl_activate_notification'),
443 $this->lng->txt('dcl_notification_info')
444 );
445 $inputs['edit'] = $this->ui_factory->input()->field()->section($edit, $this->lng->txt($this->type . '_edit'))
446 ->withValue([
447 'title' => $this->object->getTitle(),
448 'description' => $this->object->getLongDescription(),
449 'notification' => $this->object->getNotification(),
450 ]);
451
452 $availability = [];
453 $availability['online'] = $this->ui_factory->input()->field()->checkbox(
454 $this->lng->txt('online'),
455 $this->lng->txt('dcl_online_info')
456 );
457 $inputs['availability'] = $this->ui_factory->input()->field()->section($availability, $this->lng->txt('obj_activation_list_gui'))
458 ->withValue(['online' => $this->object->getOnline(),]);
459
460 $presentation = [];
461 $presentation['tile_image'] = $this->object->getObjectProperties()->getPropertyTileImage()->toForm(
462 $this->lng,
463 $this->ui_factory->input()->field(),
464 $this->refinery
465 );
466 $inputs['presentation'] = $this->ui_factory->input()->field()->section($presentation, $this->lng->txt('cont_presentation'));
467
468 return $this->ui_factory->input()->container()->form()->standard($this->ctrl->getFormAction($this, 'update'), $inputs);
469 }
This describes commonalities between all forms.
Definition: Form.php:33

References ILIAS\UI\Implementation\Component\Input\$inputs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by update().

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

◆ listRecords()

ilObjDataCollectionGUI::listRecords ( )
final

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

524 : void
525 {
526 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
527 }

References ILIAS\Repository\ctrl().

Referenced by executeCommand(), and render().

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

◆ render()

ilObjDataCollectionGUI::render ( )

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

320 : void
321 {
322 $this->listRecords();
323 }

References listRecords().

+ Here is the call graph for this function:

◆ setEditTabs()

ilObjDataCollectionGUI::setEditTabs ( )
protected

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

508 : void
509 {
510 $this->tabs->addSubTab(
511 'general',
512 $this->lng->txt('general'),
513 $this->ctrl->getLinkTargetByClass(self::class, 'edit')
514 );
515 $this->tabs->addSubTab(
516 'cont_style',
517 $this->lng->txt('cont_style'),
518 $this->ctrl->getLinkTargetByClass(ilObjectContentStyleSettingsGUI::class)
519 );
520
521 $this->tabs->activateSubTab('general');
522 }

References ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by edit(), executeCommand(), and update().

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

◆ setTableId()

ilObjDataCollectionGUI::setTableId ( int  $objectOrRefId = 0)
private

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

83 : void
84 {
85 if ($this->http->wrapper()->query()->has('table_id')) {
86 $this->table_id = $this->http->wrapper()->query()->retrieve('table_id', $this->refinery->kindlyTo()->int());
87 } elseif ($this->http->wrapper()->query()->has('tableview_id')) {
88 $this->table_id = ilDclTableView::find(
89 $this->http->wrapper()->query()->retrieve('tableview_id', $this->refinery->kindlyTo()->int())
90 )->getTableId();
91 } elseif ($objectOrRefId > 0) {
92 $tables = ilObjDataCollectionAccess::hasWriteAccess($this->ref_id) ? $this->object->getTables() : $this->object->getVisibleTables();
93 if ($tables !== []) {
94 $this->table_id = array_shift($tables)->getId();
95 }
96 }
97 }
static hasWriteAccess(int $ref, ?int $user_id=0)

References ilObjDataCollectionAccess\hasWriteAccess(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by __construct().

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

◆ setTabs()

ilObjDataCollectionGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

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

Reimplemented from ilObject2GUI.

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

402 : void
403 {
404 $ref_id = $this->object->getRefId();
405
406 if ($this->access->checkAccess('read', '', $ref_id) === true) {
407 $this->addTab(self::TAB_CONTENT, $this->ctrl->getLinkTargetByClass(ilDclRecordListGUI::class, 'show'));
408 }
409
410 if ($this->access->checkAccess('visible', '', $ref_id) === true || $this->access->checkAccess('read', '', $ref_id) === true) {
411 $this->addTab(self::TAB_INFO, $this->ctrl->getLinkTargetByClass(ilInfoScreenGUI::class, 'showSummary'));
412 }
413
414 if ($this->access->checkAccess('write', '', $ref_id) === true) {
415 $this->addTab(self::TAB_EDIT_DCL, $this->ctrl->getLinkTarget($this, 'edit'));
416 $this->addTab(self::TAB_LIST_TABLES, $this->ctrl->getLinkTargetByClass(ilDclTableListGUI::class, 'listTables'));
417 $mdgui = new ilObjectMetaDataGUI($this->object);
418 if ($mdtab = $mdgui->getTab()) {
419 $this->tabs_gui->addTab(self::TAB_META_DATA, $this->lng->txt('meta_data'), $mdtab);
420 }
421 $this->addTab(self::TAB_EXPORT, $this->ctrl->getLinkTargetByClass(ilExportGUI::class, ''));
422 }
423
424 if ($this->access->checkAccess('edit_permission', '', $ref_id) === true) {
425 $this->addTab(self::TAB_LIST_PERMISSIONS, $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, 'perm'));
426 }
427 }
addTab(string $langKey, string $link)

References ilObjectGUI\$ref_id, ILIAS\Repository\access(), addTab(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ update()

ilObjDataCollectionGUI::update ( )

Reimplemented from ilObject2GUI.

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

483 : void
484 {
485 if (!$this->checkPermissionBool('write')) {
486 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
487 }
488
489 $this->setEditTabs();
490 $this->tabs->activateTab(self::TAB_EDIT_DCL);
491
492 $form = $this->initForm()->withRequest($this->http->request());
493 $data = $form->getData();
494
495 if ($data !== null) {
496 $this->object->setTitle($data['edit']['title']);
497 $this->object->setDescription($data['edit']['description']);
498 $this->object->setNotification($data['edit']['notification']);
499 $this->object->setOnline($data['availability']['online']);
500 $this->object->getObjectProperties()->storePropertyTileImage($data['presentation']['tile_image']);
501 $this->object->update();
502 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
503 }
504
505 $this->tpl->setContent($this->ui_renderer->render($form));
506 }
error(string $a_errmsg)

References ilObjectGUI\$data, ilObject2GUI\checkPermissionBool(), error(), ILIAS\FileDelivery\http(), initForm(), ILIAS\Repository\lng(), setEditTabs(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilObjDataCollectionGUI::$ctrl
protected

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

Referenced by _goto().

◆ $lng

ilLanguage ilObjDataCollectionGUI::$lng
protected

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

Referenced by _goto().

◆ $notification_settings

ilDclNotification ilObjDataCollectionGUI::$notification_settings
private

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

◆ $object

ilObject ilObjDataCollectionGUI::$object = null

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

Referenced by _goto().

◆ $table_id

int ilObjDataCollectionGUI::$table_id
protected

◆ $tabs

ilTabsGUI ilObjDataCollectionGUI::$tabs
protected

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

◆ GET_RECORD_ID

const ilObjDataCollectionGUI::GET_RECORD_ID = 'record_id'

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

Referenced by _goto().

◆ GET_REF_ID

const ilObjDataCollectionGUI::GET_REF_ID = 'ref_id'

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

Referenced by _goto().

◆ GET_TABLE_ID

const ilObjDataCollectionGUI::GET_TABLE_ID = 'table_id'

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

Referenced by _goto().

◆ GET_VIEW_ID

const ilObjDataCollectionGUI::GET_VIEW_ID = 'tableview_id'

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

Referenced by _goto().

◆ TAB_CONTENT

const ilObjDataCollectionGUI::TAB_CONTENT = 'content'

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

◆ TAB_EDIT_DCL

const ilObjDataCollectionGUI::TAB_EDIT_DCL = 'settings'

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

◆ TAB_EXPORT

const ilObjDataCollectionGUI::TAB_EXPORT = 'export'

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

◆ TAB_INFO

const ilObjDataCollectionGUI::TAB_INFO = 'info_short'

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

◆ TAB_LIST_PERMISSIONS

const ilObjDataCollectionGUI::TAB_LIST_PERMISSIONS = 'perm_settings'

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

◆ TAB_LIST_TABLES

const ilObjDataCollectionGUI::TAB_LIST_TABLES = 'dcl_tables'

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

◆ TAB_META_DATA

const ilObjDataCollectionGUI::TAB_META_DATA = 'meta_data'

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


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