ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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 ()
 
 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
 
int $tableview_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

 setTableData ()
 
 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 61 of file class.ilObjDataCollectionGUI.php.

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), addJavaScript(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), setTableData(), 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 388 of file class.ilObjDataCollectionGUI.php.

388 : void
389 {
390 global $DIC;
391
393 $values = array_combine($values, array_pad(explode('_', $a_target), count($values), 0));
394
395 $ref_id = (int) $values[self::GET_REF_ID];
396 if ($ref_id !== 0) {
397 $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, self::GET_REF_ID, $ref_id);
398 $table_id = (int) $values[self::GET_TABLE_ID];
399 if ($table_id !== 0) {
400 $DIC->ctrl()->setParameterByClass(ilObjDataCollectionGUI::class, self::GET_TABLE_ID, $table_id);
401 $view_id = (int) $values[self::GET_VIEW_ID];
402 if ($view_id !== 0) {
403 $DIC->ctrl()->setParameterByClass(ilObjDataCollectionGUI::class, self::GET_VIEW_ID, $view_id);
404 }
405 $record_id = (int) $values[self::GET_RECORD_ID];
406 if ($record_id !== 0) {
407 $DIC->ctrl()->setParameterByClass(ilDclDetailedViewGUI::class, self::GET_RECORD_ID, $record_id);
408 $DIC->ctrl()->redirectByClass([ilRepositoryGUI::class, self::class, ilDclDetailedViewGUI::class], 'renderRecord');
409 }
410 }
411 }
412 $DIC->ctrl()->redirectByClass([ilRepositoryGUI::class, self::class, ilDclRecordListGUI::class], 'listRecords');
413 }

References $DIC, ilObjectGUI\$ref_id, $table_id, GET_RECORD_ID, GET_REF_ID, GET_TABLE_ID, GET_VIEW_ID, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ activateNotification()

ilObjDataCollectionGUI::activateNotification ( )
final

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

549 : void
550 {
552 foreach (ilDclNotificationType::cases() as $notification) {
553 $this->notification_settings->add($this->object, $this->user, $notification);
554 }
555 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
556 }
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 578 of file class.ilObjDataCollectionGUI.php.

578 : void
579 {
581 $this->ctrl->getLinkTarget($this, 'redrawHeaderAction', '', true),
582 '',
583 $this->ctrl->getLinkTargetByClass([ilCommonActionDispatcherGUI::class, ilTaggingGUI::class], '', '', true)
584 );
585
586 $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $this->access, 'dcl', $this->ref_id, $this->obj_id);
587
588 $lg = $dispatcher->initHeaderAction();
589
590 if ($this->user->getId() != ANONYMOUS_USER_ID and $this->object->getNotification() == 1) {
592 $lg->addCustomCommandButton(
593 $this->ui_factory->button()->shy(
594 $this->lng->txt('dcl_notification_deactivate'),
595 $this->ctrl->getLinkTarget($this, 'deactivateNotification')
596 )
597 );
598 $modal = $this->getNotificationModal();
599 $lg->addCustomCommandButton(
600 $this->ui_factory->button()->shy(
601 $this->lng->txt('dcl_notification_settings'),
602 $modal->getShowSignal()
603 ),
604 $modal
605 );
606 $lg->addHeaderIcon('not_icon', ilUtil::getImagePath('object/notification_on.svg'), $this->lng->txt('dcl_notification_activated'));
607 } else {
608 $lg->addCustomCommandButton(
609 $this->ui_factory->button()->shy(
610 $this->lng->txt('dcl_notification_activate'),
611 $this->ctrl->getLinkTarget($this, 'activateNotification')
612 )
613 );
614 $lg->addHeaderIcon('not_icon', ilUtil::getImagePath('object/notification_off.svg'), $this->lng->txt('dcl_notification_deactivated'));
615 }
616 $this->ctrl->setParameter($this, 'ntf', '');
617 }
618
619 $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
620 }
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 143 of file class.ilObjDataCollectionGUI.php.

143 : void
144 {
145 $this->tpl->addJavaScript('assets/js/datacollection.js');
146 }

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

377 : void
378 {
379 if (is_object($this->object) === true) {
380 $this->locator->addItem(
381 $this->object->getTitle(),
382 $this->ctrl->getLinkTarget($this, ''),
383 (string) $this->object->getRefId()
384 );
385 }
386 }

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

448 : void
449 {
450 $this->tabs->addTab($langKey, $this->lng->txt($langKey), $link);
451 }

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

415 : void
416 {
417 $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
418 $this->ctrl->redirectByClass(ilDclTableListGUI::class, 'listTables');
419 }

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

+ Here is the call graph for this function:

◆ deactivateNotification()

ilObjDataCollectionGUI::deactivateNotification ( )
final

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

558 : void
559 {
560 ilNotification::setNotification(ilNotification::TYPE_DATA_COLLECTION, $this->user->getId(), $this->obj_id, false);
561 $this->notification_settings->clear($this->object, $this->user);
562 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
563 }

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

490 : void
491 {
492 $this->checkPermission('write');
493
494 $this->setEditTabs();
495 $this->tabs->activateTab(self::TAB_EDIT_DCL);
496
497 $this->tpl->setContent($this->ui_renderer->render($this->initForm()));
498 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

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

+ Here is the call graph for this function:

◆ editNotification()

ilObjDataCollectionGUI::editNotification ( )
final

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

565 : void
566 {
567 if ($data = $this->getNotificationModal()->withRequest($this->request)->getData()) {
568 $this->notification_settings->clear($this->object, $this->user);
569 foreach (ilDclNotificationType::cases() as $notification) {
570 if ($data[$notification->value]) {
571 $this->notification_settings->add($this->object, $this->user, $notification);
572 }
573 }
574 }
575 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
576 }

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

158 : void
159 {
160 global $DIC;
161
162 $ilNavigationHistory = $DIC['ilNavigationHistory'];
163 $DIC->help()->setScreenIdComponent('dcl');
164 $link = $this->ctrl->getLinkTarget($this, 'render');
165
166 if ($this->getObject() !== null) {
167 $ilNavigationHistory->addItem($this->object->getRefId(), $link, 'dcl');
168 }
169
170 $next_class = $this->ctrl->getNextClass($this);
171 $cmd = $this->ctrl->getCmd();
172
173 if (!$this->getCreationMode() && $next_class != 'ilinfoscreengui' && $cmd !== 'infoScreen' && !$this->checkPermissionBool('read')) {
174 $DIC->ui()->mainTemplate()->loadStandardTemplate();
175 $DIC->ui()->mainTemplate()->setContent('Permission Denied.');
176 return;
177 }
178
179 switch ($next_class) {
180 case strtolower(ilInfoScreenGUI::class):
181 $this->prepareOutput();
182 $this->tabs->activateTab(self::TAB_INFO);
183 $this->infoScreenForward();
184 break;
185 case strtolower(ilCommonActionDispatcherGUI::class):
186 $this->prepareOutput();
188 $gui->enableCommentsSettings(false);
189 $this->ctrl->forwardCommand($gui);
190 break;
191 case strtolower(ilPermissionGUI::class):
192 $this->prepareOutput();
193 $this->tabs->activateTab(self::TAB_LIST_PERMISSIONS);
194 $perm_gui = new ilPermissionGUI($this);
195 $this->ctrl->forwardCommand($perm_gui);
196 break;
197 case strtolower(ilObjectCopyGUI::class):
198 $cp = new ilObjectCopyGUI($this);
199 $cp->setType('dcl');
200 $DIC->ui()->mainTemplate()->loadStandardTemplate();
201 $this->ctrl->forwardCommand($cp);
202 break;
203 case strtolower(ilDclTableListGUI::class):
204 $this->prepareOutput();
205 $this->tabs->activateTab(self::TAB_LIST_TABLES);
206 $tablelist_gui = new ilDclTableListGUI($this);
207 $this->ctrl->forwardCommand($tablelist_gui);
208 break;
209 case strtolower(ilDclRecordListGUI::class):
210 $this->addHeaderAction();
211 $this->prepareOutput();
212 $this->tabs->activateTab(self::TAB_CONTENT);
213 if (!isset($this->table_id)) {
214 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_table_found'));
215 } elseif (!isset($this->tableview_id)) {
216 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
217 } else {
218 $recordlist_gui = new ilDclRecordListGUI($this, $this->table_id, $this->tableview_id);
219 $this->ctrl->forwardCommand($recordlist_gui);
220 }
221 break;
222 case strtolower(ilDclRecordEditGUI::class):
223 $this->prepareOutput();
224 $this->tabs->activateTab(self::TAB_CONTENT);
225 if (!isset($this->table_id)) {
226 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_table_found'));
227 } elseif (!isset($this->tableview_id)) {
228 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
229 } else {
230 $recordedit_gui = new ilDclRecordEditGUI($this, $this->table_id, $this->tableview_id);
231 $this->ctrl->forwardCommand($recordedit_gui);
232 }
233 break;
234 case strtolower(ilObjFileGUI::class):
235 $this->prepareOutput();
236 $this->tabs->activateTab(self::TAB_CONTENT);
237 $file_gui = new ilObjFile($this->getRefId());
238 $this->ctrl->forwardCommand($file_gui);
239 break;
240 case strtolower(ilRatingGUI::class):
241 $rgui = new ilRatingGUI();
242
243 $record_id = $this->http->wrapper()->query()->retrieve('record_id', $this->refinery->kindlyTo()->int());
244 $field_id = $this->http->wrapper()->query()->retrieve('field_id', $this->refinery->kindlyTo()->int());
245
246 $rgui->setObject($record_id, 'dcl_record', $field_id, 'dcl_field');
247 $rgui->executeCommand();
248
249 $detail = $this->http->wrapper()->query()->retrieve('detail_view', $this->refinery->kindlyTo()->bool());
250 $this->ctrl->setParameterByClass(
251 $detail ? ilDclDetailedViewGUI::class : ilDclRecordListGUI::class,
252 'tableview_id',
253 $this->http->wrapper()->query()->retrieve('tableview_id', $this->refinery->kindlyTo()->int())
254 );
255 if ($detail) {
256 $this->ctrl->setParameterByClass(
257 ilDclDetailedViewGUI::class,
258 'record_id',
259 $this->http->wrapper()->query()->retrieve('record_id', $this->refinery->kindlyTo()->int())
260 );
261 $this->ctrl->redirectByClass([ilRepositoryGUI::class, self::class, ilDclDetailedViewGUI::class], 'renderRecord');
262 } else {
263 $this->listRecords();
264 }
265 break;
266 case strtolower(ilDclDetailedViewGUI::class):
267 $this->prepareOutput();
268 if (!isset($this->tableview_id)) {
269 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
270 } else {
271 $recordview_gui = new ilDclDetailedViewGUI($this, $this->tableview_id);
272 $this->ctrl->forwardCommand($recordview_gui);
273 $this->tabs->setBackTarget(
274 $this->lng->txt('back'),
275 $this->ctrl->getLinkTargetByClass(
276 ilDclRecordListGUI::class,
278 )
279 );
280 }
281 break;
282 case strtolower(ilNoteGUI::class):
283 $this->prepareOutput();
284 if (!isset($this->tableview_id)) {
285 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
286 } else {
287 $recordviewGui = new ilDclDetailedViewGUI($this, $this->tableview_id);
288 $this->ctrl->forwardCommand($recordviewGui);
289 $this->tabs->clearTargets();
290 $this->tabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, ''));
291 }
292 break;
293 case strtolower(ilExportGUI::class):
294 $this->prepareOutput();
295 $this->handleExport();
296 break;
297 case strtolower(ilDclPropertyFormGUI::class):
298 if (!isset($this->table_id)) {
299 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_table_found'));
300 } elseif (!isset($this->tableview_id)) {
301 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_INFO, $this->lng->txt('dcl_no_tableview_found'));
302 } else {
303 $recordedit_gui = new ilDclRecordEditGUI($this, $this->table_id, $this->tableview_id);
304 $recordedit_gui->getRecord();
305 $recordedit_gui->initForm();
306 $form = $recordedit_gui->getForm();
307 $this->ctrl->forwardCommand($form);
308 }
309 break;
310 case strtolower(ilObjectMetaDataGUI::class):
311 $this->checkPermission('write');
312 $this->prepareOutput();
313 $this->tabs->activateTab(self::TAB_META_DATA);
314 $gui = new ilObjectMetaDataGUI($this->object);
315 $this->ctrl->forwardCommand($gui);
316 break;
317 case strtolower(ilObjectContentStyleSettingsGUI::class):
318 $this->checkPermission('write');
319 $this->prepareOutput();
320 $this->setEditTabs();
321 $this->tabs->activateTab('settings');
322 $this->tabs->activateSubTab('cont_style');
323 global $DIC;
324 $settings_gui = $DIC->contentStyle()->gui()->objectSettingsGUIForRefId(null, $this->ref_id);
325 $this->ctrl->forwardCommand($settings_gui);
326 break;
327 default:
328 parent::executeCommand();
329 }
330 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
@ilCtrl_Calls ilDclDetailedViewGUI: ilDclDetailedViewDefinitionGUI, ilEditClipboardGUI,...
@ilCtrl_Calls ilDclRecordListGUI: ilDataCollectionUploadHandlerGUI
@ilCtrl_Calls ilDclTableListGUI: ilDclFieldListGUI, ilDclFieldEditGUI, ilDclTableViewGUI,...
addHeaderAction()
Add header action menu.
handleExport(bool $do_default=false)
Class ilObjFile.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_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.
if(!file_exists('../ilias.ini.php'))

References $DIC, addHeaderAction(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ilDclRecordListGUI\CMD_LIST_RECORDS, ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\getObject(), ilObjectGUI\getRefId(), 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 544 of file class.ilObjDataCollectionGUI.php.

545 {
546 return new ilObjDataCollection($this->ref_id, true);
547 }

◆ getNotificationModal()

ilObjDataCollectionGUI::getNotificationModal ( )
protected

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

622 : RoundTrip
623 {
624 return $this->ui_factory->modal()->roundtrip(
625 $this->lng->txt('dcl_notification_settings'),
626 null,
627 [
628 ilDclNotificationType::RECORD_CREATE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_new_entries'))
629 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_CREATE)),
630 ilDclNotificationType::RECORD_UPDATE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_updated_entries'))
631 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_UPDATE)),
632 ilDclNotificationType::RECORD_DELETE->value => $this->ui_factory->input()->field()->checkbox($this->lng->txt('dcl_deleted_entries'))
633 ->withValue($this->notification_settings->has($this->object, $this->user->getId(), ilDclNotificationType::RECORD_DELETE)),
634 ],
635 $this->ctrl->getLinkTarget($this, 'editNotification')
636 );
637 }

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

138 : int
139 {
140 return $this->obj_id;
141 }

References ilObjectGUI\$obj_id.

◆ getStandardCmd()

ilObjDataCollectionGUI::getStandardCmd ( )

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

148 : string
149 {
150 return 'render';
151 }

◆ getType()

ilObjDataCollectionGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

153 : string
154 {
156 }

References ilObjDataCollection\TYPE.

◆ handleExport()

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

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

332 : void
333 {
334 $this->tabs->setTabActive(self::TAB_EXPORT);
335 $exp_gui = new ilExportGUI($this);
336 if ($do_default) {
337 $exp_gui->listExportFiles();
338 } else {
339 $this->ctrl->forwardCommand($exp_gui);
340 }
341 }
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 343 of file class.ilObjDataCollectionGUI.php.

343 : void
344 {
345 $this->tabs->setTabActive(self::TAB_EXPORT);
346 $exp_gui = new ilExportGUI($this);
347 $exporter = new ilDclContentExporter($this->object->getRefId(), null);
348 $exporter->exportAsync();
349 $this->ctrl->redirect($exp_gui);
350 }

References ILIAS\TestQuestionPool\ExportImport\Foundation\Export\$exporter, ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjDataCollectionGUI::infoScreen ( )

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

352 : void
353 {
354 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
355 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjDataCollectionGUI::infoScreenForward ( )

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

362 : void
363 {
364 $this->tabs->activateTab(self::TAB_INFO);
365
366 if (!$this->checkPermissionBool('visible')) {
367 $this->checkPermission('read');
368 }
369
370 $info = new ilInfoScreenGUI($this);
371 $info->enablePrivateNotes();
372 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
373
374 $this->ctrl->forwardCommand($info);
375 }
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 453 of file class.ilObjDataCollectionGUI.php.

453 : Form
454 {
455 $inputs = [];
456
457 $edit = [];
458 $edit['title'] = $this->ui_factory->input()->field()->text($this->lng->txt('title'))->withRequired(true);
459 $edit['description'] = $this->ui_factory->input()->field()->textarea($this->lng->txt('description'));
460 $edit['notification'] = $this->ui_factory->input()->field()->checkbox(
461 $this->lng->txt('dcl_activate_notification'),
462 $this->lng->txt('dcl_notification_info')
463 );
464 $inputs['edit'] = $this->ui_factory->input()->field()->section($edit, $this->lng->txt($this->type . '_edit'))
465 ->withValue([
466 'title' => $this->object->getTitle(),
467 'description' => $this->object->getLongDescription(),
468 'notification' => $this->object->getNotification(),
469 ]);
470
471 $availability = [];
472 $availability['online'] = $this->ui_factory->input()->field()->checkbox(
473 $this->lng->txt('online'),
474 $this->lng->txt('dcl_online_info')
475 );
476 $inputs['availability'] = $this->ui_factory->input()->field()->section($availability, $this->lng->txt('obj_activation_list_gui'))
477 ->withValue(['online' => $this->object->getOnline(),]);
478
479 $presentation = [];
480 $presentation['tile_image'] = $this->object->getObjectProperties()->getPropertyTileImage()->toForm(
481 $this->lng,
482 $this->ui_factory->input()->field(),
483 $this->refinery
484 );
485 $inputs['presentation'] = $this->ui_factory->input()->field()->section($presentation, $this->lng->txt('cont_presentation'));
486
487 return $this->ui_factory->input()->container()->form()->standard($this->ctrl->getFormAction($this, 'update'), $inputs);
488 }
This describes commonalities between all forms.
Definition: Form.php:34

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

539 : void
540 {
541 $this->ctrl->redirectByClass(ilDclRecordListGUI::class, 'show');
542 }

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

357 : void
358 {
359 $this->listRecords();
360 }

References listRecords().

+ Here is the call graph for this function:

◆ setEditTabs()

ilObjDataCollectionGUI::setEditTabs ( )
protected

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

523 : void
524 {
525 $this->tabs->addSubTab(
526 'general',
527 $this->lng->txt('general'),
528 $this->ctrl->getLinkTargetByClass(self::class, 'edit')
529 );
530 $this->tabs->addSubTab(
531 'cont_style',
532 $this->lng->txt('cont_style'),
533 $this->ctrl->getLinkTargetByClass(ilObjectContentStyleSettingsGUI::class)
534 );
535
536 $this->tabs->activateSubTab('general');
537 }

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:

◆ setTableData()

ilObjDataCollectionGUI::setTableData ( )
private

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

84 : void
85 {
86 if ($this->ref_id > 0) {
87 if ($this->http->wrapper()->post()->has('table_id')) {
88 $this->table_id = $this->http->wrapper()->post()->retrieve(
89 'table_id',
90 $this->refinery->kindlyTo()->int()
91 );
92 } elseif ($this->http->wrapper()->query()->has('table_id')) {
93 $this->table_id = $this->http->wrapper()->query()->retrieve(
94 'table_id',
95 $this->refinery->kindlyTo()->int()
96 );
97 }
98
99 if (!isset($this->table_id) || !in_array($this->table_id, array_keys($this->object->getTables()))) {
100 if (isset($this->table_id)) {
101 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('table_not_found'), true);
102 unset($this->table_id);
103 }
104 $tables = ilObjDataCollectionAccess::hasWriteAccess($this->ref_id) ? $this->object->getTables() : $this->object->getVisibleTables();
105 if ($tables !== []) {
106 $this->table_id = array_shift($tables)->getId();
107 $tableview = (ilDclCache::getTableCache($this->table_id))->getFirstTableViewId();
108 if ($tableview !== null) {
109 $this->tableview_id = $tableview;
110 }
111 }
112 } else {
113 if ($this->http->wrapper()->post()->has('tableview_id')) {
114 $this->tableview_id = $this->http->wrapper()->post()->retrieve(
115 'tableview_id',
116 $this->refinery->kindlyTo()->int()
117 );
118 } elseif ($this->http->wrapper()->query()->has('tableview_id')) {
119 $this->tableview_id = $this->http->wrapper()->query()->retrieve(
120 'tableview_id',
121 $this->refinery->kindlyTo()->int()
122 );
123 }
124
125 if (!isset($this->tableview_id) || !in_array($this->tableview_id, array_keys($this->object->getTableById($this->table_id)->getTableViews()))) {
126 if (isset($this->tableview_id)) {
127 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('tableview_not_found'), true);
128 }
129 $tableview = (ilDclCache::getTableCache($this->table_id))->getFirstTableViewId();
130 if ($tableview !== null) {
131 $this->tableview_id = $tableview;
132 }
133 }
134 }
135 }
136 }
static getTableCache(?int $table_id=null)
static hasWriteAccess(int $ref, ?int $user_id=0)

References ilDclCache\getTableCache(), ilObjDataCollectionAccess\hasWriteAccess(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), 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 421 of file class.ilObjDataCollectionGUI.php.

421 : void
422 {
423 $ref_id = $this->object->getRefId();
424
425 if ($this->access->checkAccess('read', '', $ref_id) === true) {
426 $this->addTab(self::TAB_CONTENT, $this->ctrl->getLinkTargetByClass(ilDclRecordListGUI::class, 'show'));
427 }
428
429 if ($this->access->checkAccess('visible', '', $ref_id) === true || $this->access->checkAccess('read', '', $ref_id) === true) {
430 $this->addTab(self::TAB_INFO, $this->ctrl->getLinkTargetByClass(ilInfoScreenGUI::class, 'showSummary'));
431 }
432
433 if ($this->access->checkAccess('write', '', $ref_id) === true) {
434 $this->addTab(self::TAB_EDIT_DCL, $this->ctrl->getLinkTarget($this, 'edit'));
435 $this->addTab(self::TAB_LIST_TABLES, $this->ctrl->getLinkTargetByClass(ilDclTableListGUI::class, 'listTables'));
436 $mdgui = new ilObjectMetaDataGUI($this->object);
437 if ($mdtab = $mdgui->getTab()) {
438 $this->tabs_gui->addTab(self::TAB_META_DATA, $this->lng->txt('meta_data'), $mdtab);
439 }
440 $this->addTab(self::TAB_EXPORT, $this->ctrl->getLinkTargetByClass(ilExportGUI::class, ''));
441 }
442
443 if ($this->access->checkAccess('edit_permission', '', $ref_id) === true) {
444 $this->addTab(self::TAB_LIST_PERMISSIONS, $this->ctrl->getLinkTargetByClass(ilPermissionGUI::class, 'perm'));
445 }
446 }
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 500 of file class.ilObjDataCollectionGUI.php.

500 : void
501 {
502 $this->checkPermission('write');
503
504 $this->setEditTabs();
505 $this->tabs->activateTab(self::TAB_EDIT_DCL);
506
507 $form = $this->initForm()->withRequest($this->http->request());
508 $data = $form->getData();
509
510 if ($data !== null) {
511 $this->object->setTitle($data['edit']['title']);
512 $this->object->setDescription($data['edit']['description']);
513 $this->object->setNotification($data['edit']['notification']);
514 $this->object->setOnline($data['availability']['online']);
515 $this->object->getObjectProperties()->storePropertyTileImage($data['presentation']['tile_image']);
516 $this->object->update();
517 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
518 }
519
520 $this->ctrl->redirect($this, 'edit');
521 }

References ilObjectGUI\$data, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), 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.

◆ $lng

ilLanguage ilObjDataCollectionGUI::$lng
protected

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

◆ $notification_settings

ilDclNotification ilObjDataCollectionGUI::$notification_settings
private

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

◆ $object

ilObject ilObjDataCollectionGUI::$object = null

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

◆ $table_id

int ilObjDataCollectionGUI::$table_id
protected

◆ $tableview_id

int ilObjDataCollectionGUI::$tableview_id
protected

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

◆ $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: