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

Object GUI class for repository plugins. More...

+ Inheritance diagram for ilObjectPluginGUI:
+ Collaboration diagram for ilObjectPluginGUI:

Public Member Functions

 executeCommand ()
 execute command More...
 
 getAfterCreationCmd ()
 Cmd that will be redirected to after creation of a new object. More...
 
 getStandardCmd ()
 
 performCommand (string $cmd)
 
 addInilPluginAdminfoTab ()
 
 addPermissionTab ()
 
 addInfoTab ()
 
 addExportTab ()
 
 infoScreen ()
 
 addInfoItems (ilInfoScreenGUI $info)
 Add items to info screen. More...
 
- 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 (array $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)
 

Protected Member Functions

 addLocatorItems ()
 Functions to be overwritten. More...
 
 getPlugin ()
 Get plugin object. More...
 
 txt (string $a_var)
 
 getCreationFormTitle ()
 Use custom creation form titles. More...
 
 supportsCloning ()
 
 initEditForm ()
 Init object update form. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 supportsExport ()
 
 lookupParentTitleInCreationMode ()
 
 performNextClass (string $next_class)
 
- 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

ilComponentRepository $component_repository
 
ilNavigationHistory $nav_history
 
ilTabsGUI $tabs
 
ilPlugin $plugin = null
 
PluginSlotGUIRequest $slot_request
 
ilComponentFactory $component_factory
 
- 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 = ""
 

Additional Inherited Members

- 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]
 

Detailed Description

Object GUI class for repository plugins.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilObjectPluginGUI.php.

Member Function Documentation

◆ _goto()

static ilObjectPluginGUI::_goto ( array  $a_target)
static
Parameters
list<string>$a_target

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

383 : void
384 {
385 global $DIC;
386 $main_tpl = $DIC->ui()->mainTemplate();
387
388 $ilCtrl = $DIC->ctrl();
389 $ilAccess = $DIC->access();
390 $lng = $DIC->language();
391
392 $t = explode("_", $a_target[0]);
393 $ref_id = (int) $t[0];
394 $class_name = $a_target[1];
395
396 if ($ilAccess->checkAccess("read", "", $ref_id)) {
397 $ilCtrl->setTargetScript('ilias.php');
398 $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
399 $ilCtrl->redirectByClass(["ilobjplugindispatchgui", $class_name], "");
400 } elseif ($ilAccess->checkAccess("visible", "", $ref_id)) {
401 $ilCtrl->setTargetScript('ilias.php');
402 $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
403 $ilCtrl->redirectByClass(["ilobjplugindispatchgui", $class_name], "infoScreen");
404 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
405 $main_tpl->setOnScreenMessage('failure', sprintf(
406 $lng->txt("msg_no_perm_read_item"),
408 ));
410 }
411 }
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...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: shib_login.php:26

References $DIC, ilObject2GUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), ROOT_FOLDER_ID, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addExportTab()

ilObjectPluginGUI::addExportTab ( )

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

338 : void
339 {
340 // write
341 if ($this->access->checkAccess('write', "", $this->object->getRefId())) {
342 $this->tabs->addTarget(
343 'export',
344 $this->ctrl->getLinkTargetByClass("ilexportgui", ''),
345 'export',
346 'ilexportgui'
347 );
348 }
349 }

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

+ Here is the call graph for this function:

◆ addInfoItems()

ilObjectPluginGUI::addInfoItems ( ilInfoScreenGUI  $info)

Add items to info screen.

Definition at line 376 of file class.ilObjectPluginGUI.php.

376 : void
377 {
378 }

Referenced by infoScreen().

+ Here is the caller graph for this function:

◆ addInfoTab()

ilObjectPluginGUI::addInfoTab ( )

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

320 : void
321 {
322 $ilAccess = $this->access;
323 $ilTabs = $this->tabs;
324
325 // info screen
326 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
327 $ilTabs->addTarget(
328 "info_short",
329 $this->ctrl->getLinkTargetByClass(
330 "ilinfoscreengui",
331 "showSummary"
332 ),
333 "showSummary"
334 );
335 }
336 }
ilAccessHandler $access
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)

References ilObject2GUI\$access, $tabs, ilTabsGUI\addTarget(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ addInilPluginAdminfoTab()

ilObjectPluginGUI::addInilPluginAdminfoTab ( )

Definition at line 285 of file class.ilObjectPluginGUI.php.

285 : void
286 {
287 $ilAccess = $this->access;
288 $ilTabs = $this->tabs;
289
290 // info screen
291 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
292 $ilTabs->addTarget(
293 "info_short",
294 $this->ctrl->getLinkTargetByClass(
295 "ilinfoscreengui",
296 "showSummary"
297 ),
298 "showSummary"
299 );
300 }
301 }

References ilObject2GUI\$access, $tabs, ilTabsGUI\addTarget(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjectPluginGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 186 of file class.ilObjectPluginGUI.php.

186 : void
187 {
188 $ilLocator = $this->locator;
189
190 if (!$this->getCreationMode()) {
191 $ilLocator->addItem(
192 $this->object->getTitle(),
193 $this->ctrl->getLinkTarget($this, $this->getStandardCmd()),
194 "",
195 $this->slot_request->getRefId()
196 );
197 }
198 }
ilLocatorGUI $locator

References ilObject2GUI\$locator, ilObject2GUI\getCreationMode(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addPermissionTab()

ilObjectPluginGUI::addPermissionTab ( )

Definition at line 303 of file class.ilObjectPluginGUI.php.

303 : void
304 {
305 $ilAccess = $this->access;
306 $ilTabs = $this->tabs;
307 $ilCtrl = $this->ctrl;
308
309 // edit permissions
310 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
311 $ilTabs->addTarget(
312 "perm_settings",
313 $ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
314 ["perm", "info", "owner"],
315 'ilpermissiongui'
316 );
317 }
318 }

References ilObject2GUI\$access, ilObject2GUI\$ctrl, and $tabs.

◆ afterSave()

ilObjectPluginGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 265 of file class.ilObjectPluginGUI.php.

265 : void
266 {
267 $ilCtrl = $this->ctrl;
268 // always send a message
269 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
270
271 $ilCtrl->setTargetScript('ilias.php');
272 $ilCtrl->setParameterByClass(get_class($this), "ref_id", $new_object->getRefId());
273 $ilCtrl->redirectByClass(["ilobjplugindispatchgui", get_class($this)], $this->getAfterCreationCmd());
274 }
setTargetScript(string $a_target_script)
@inheritDoc
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.

References ilObject2GUI\$ctrl, getAfterCreationCmd(), ilObject\getRefId(), ILIAS\Repository\lng(), and ilCtrl\setTargetScript().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjectPluginGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 62 of file class.ilObjectPluginGUI.php.

62 : void
63 {
64 $ilCtrl = $this->ctrl;
66 $ilAccess = $this->access;
68 $ilNavigationHistory = $this->nav_history;
69 $ilTabs = $this->tabs;
70
71 // get standard template (includes main menu and general layout)
73
74 // set title
75 if (!$this->getCreationMode()) {
76 $tpl->setTitle($this->object->getTitle());
77 $tpl->setTitleIcon(ilObject::_getIcon($this->object->getId()));
78
79 // set tabs
80 if (strtolower($this->slot_request->getBaseClass()) !== "iladministrationgui") {
81 $this->setTabs();
82 $this->setLocator();
83 } else {
84 $this->addAdminLocatorItems();
86 $this->setAdminTabs();
87 }
88
89 if ($ilAccess->checkAccess('read', '', $this->object->getRefId())) {
90 $ilNavigationHistory->addItem(
91 $this->object->getRefId(),
92 ilLink::_getLink($this->object->getRefId(), $this->object->getType()),
93 $this->object->getType()
94 );
95 }
96 } else {
97 // show info of parent
101 $this->slot_request->getRefId()
102 ), "big"),
104 $this->slot_request->getRefId(),
105 true
106 ))
107 );
108 $this->setLocator();
109 }
110
111 $next_class = $this->ctrl->getNextClass($this);
112 $cmd = $this->ctrl->getCmd();
113
114 switch ($next_class) {
115 case "ilinfoscreengui":
116 $this->checkPermission("visible");
117 $this->infoScreen(); // forwards command
118 break;
119
120 case 'ilpermissiongui':
121 $perm_gui = new ilPermissionGUI($this);
122 $ilTabs->setTabActive("perm_settings");
123 $ilCtrl->forwardCommand($perm_gui);
124 break;
125
126 case 'ilobjectcopygui':
127 $cp = new ilObjectCopyGUI($this);
128 $cp->setType($this->getType());
129 $this->ctrl->forwardCommand($cp);
130 break;
131
132 case 'ilexportgui':
133 // only if plugin supports it?
134 $this->tabs->setTabActive("export");
135 $exp = new ilExportGUI($this);
136 $exp->addFormat('xml');
137 $this->ctrl->forwardCommand($exp);
138 break;
139
140 case 'illearningprogressgui':
141 $user_id = $this->user->getId();
142 if ($this->slot_request->getUserId() > 0 && $this->access->checkAccess(
143 'write',
144 "",
145 $this->object->getRefId()
146 )) {
147 $user_id = $this->slot_request->getUserId();
148 }
149 $ilTabs->setTabActive("learning_progress");
150 $new_gui = new ilLearningProgressGUI(
152 $this->object->getRefId(),
154 );
155 $this->ctrl->forwardCommand($new_gui);
156 break;
157 case 'ilcommonactiondispatchergui':
159 $this->ctrl->forwardCommand($gui);
160 break;
161 default:
162 if ($next_class && $this->performNextClass($next_class)) {
163 break;
164 }
165
166 if ($cmd === "save" || $this->getCreationMode()) {
167 $this->$cmd();
168 return;
169 }
170 if (!$cmd) {
171 $cmd = $this->getStandardCmd();
172 }
173 if ($cmd === "infoScreen") {
174 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
175 } else {
176 $this->performCommand($cmd);
177 }
178 break;
179 }
180
181 if (!$this->getCreationMode()) {
183 }
184 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
Class ilObjUserTrackingGUI.
getType()
Functions that must be overwritten.
setTabs()
create tabs (repository/workspace switch)
ilGlobalTemplateInterface $tpl
addAdminLocatorItems(bool $do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setLocator()
set Locator
GUI class for the workflow of copying objects.
setAdminTabs()
set admin tabs
performNextClass(string $next_class)
ilNavigationHistory $nav_history
performCommand(string $cmd)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
setLocator()
Insert locator.
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon

References ilObject2GUI\$access, ilObject2GUI\$ctrl, ilObject2GUI\$lng, $nav_history, $tabs, ilObject2GUI\$tpl, $user_id, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilObject2GUI\addAdminLocatorItems(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getStandardCmd(), ilObject2GUI\getType(), infoScreen(), ILIAS\UICore\GlobalTemplate\loadStandardTemplate(), lookupParentTitleInCreationMode(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), performCommand(), performNextClass(), ILIAS\UICore\GlobalTemplate\printToStdout(), ilObjectGUI\setAdminTabs(), ilObject2GUI\setLocator(), ILIAS\UICore\GlobalTemplate\setLocator(), ilObject2GUI\setTabs(), ILIAS\UICore\GlobalTemplate\setTitle(), ILIAS\UICore\GlobalTemplate\setTitleIcon(), ILIAS\Repository\tabs(), ilLanguage\txt(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getAfterCreationCmd()

ilObjectPluginGUI::getAfterCreationCmd ( )
abstract

Cmd that will be redirected to after creation of a new object.

Referenced by afterSave().

+ Here is the caller graph for this function:

◆ getCreationFormTitle()

ilObjectPluginGUI::getCreationFormTitle ( )
protected

Use custom creation form titles.

Reimplemented from ilObjectGUI.

Definition at line 220 of file class.ilObjectPluginGUI.php.

220 : string
221 {
222 return $this->txt($this->getType() . "_new");
223 }

References ilObject2GUI\getType(), and txt().

+ Here is the call graph for this function:

◆ getPlugin()

ilObjectPluginGUI::getPlugin ( )
protected

Get plugin object.

Exceptions
ilPluginException

Definition at line 204 of file class.ilObjectPluginGUI.php.

204 : ilPlugin
205 {
206 if (!$this->plugin) {
207 $this->plugin = $this->component_factory->getPlugin($this->getType());
208 }
209 return $this->plugin;
210 }

References $plugin, and ilObject2GUI\getType().

Referenced by supportsExport(), and txt().

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

◆ getStandardCmd()

ilObjectPluginGUI::getStandardCmd ( )
abstract

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjectPluginGUI::infoScreen ( )

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

351 : void
352 {
354 $ilCtrl = $this->ctrl;
355 $ilTabs = $this->tabs;
356
357 $ilTabs->activateTab("info_short");
358
359 $this->checkPermission("visible");
360
361 $info = new ilInfoScreenGUI($this);
362 $info->enablePrivateNotes();
363
364 // general information
365 $lng->loadLanguageModule("meta");
366
367 $this->addInfoItems($info);
368
369 // forward the command
370 $ilCtrl->forwardCommand($info);
371 }
Class ilInfoScreenGUI.
loadLanguageModule(string $a_module)
Load language module.
addInfoItems(ilInfoScreenGUI $info)
Add items to info screen.
activateTab(string $a_id)
$info
Definition: entry_point.php:21

References ilObject2GUI\$ctrl, $info, ilObject2GUI\$lng, $tabs, ilTabsGUI\activateTab(), addInfoItems(), ilObject2GUI\checkPermission(), and ilLanguage\loadLanguageModule().

Referenced by executeCommand().

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

◆ initEditForm()

ilObjectPluginGUI::initEditForm ( )
protected

Init object update form.

Reimplemented from ilObjectGUI.

Definition at line 236 of file class.ilObjectPluginGUI.php.

237 {
239 $ilCtrl = $this->ctrl;
240
241 $form = new ilPropertyFormGUI();
242 $form->setTarget("_top");
243 $form->setFormAction($ilCtrl->getFormAction($this, "update"));
244 $form->setTitle($lng->txt("edit"));
245
246 // title
247 $ti = new ilTextInputGUI($lng->txt("title"), "title");
248 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
249 $ti->setMaxLength(ilObject::TITLE_LENGTH);
250 $ti->setRequired(true);
251 $form->addItem($ti);
252
253 // description
254 $ta = new ilTextAreaInputGUI($lng->txt("description"), "desc");
255 $ta->setCols(40);
256 $ta->setRows(2);
257 $form->addItem($ta);
258
259 $form->addCommandButton("update", $lng->txt("save"));
260 // $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
261
262 return $form;
263 }
const TITLE_LENGTH
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject\TITLE_LENGTH, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ lookupParentTitleInCreationMode()

ilObjectPluginGUI::lookupParentTitleInCreationMode ( )
protected

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 420 of file class.ilObjectPluginGUI.php.

420 : string
421 {
423 $this->slot_request->getRefId()
424 ));
425 }

References ilObject\_lookupObjId(), and ilObject\_lookupTitle().

Referenced by executeCommand().

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

◆ performCommand()

ilObjectPluginGUI::performCommand ( string  $cmd)
abstract

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ performNextClass()

ilObjectPluginGUI::performNextClass ( string  $next_class)
protected

Definition at line 427 of file class.ilObjectPluginGUI.php.

427 : bool
428 {
429 return false;
430 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ supportsCloning()

ilObjectPluginGUI::supportsCloning ( )
protected
Returns
bool returns true if this plugin object supports cloning

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 228 of file class.ilObjectPluginGUI.php.

228 : bool
229 {
230 return true;
231 }

◆ supportsExport()

ilObjectPluginGUI::supportsExport ( )
protected

Reimplemented in ilOrgUnitExtensionGUI.

Definition at line 413 of file class.ilObjectPluginGUI.php.

413 : bool
414 {
416
417 return $component_repository->getPluginSlotById("robj")->getPluginByName($this->getPlugin()->getPluginName())->supportsExport();
418 }
getPlugin()
Get plugin object.
ilComponentRepository $component_repository
getPluginSlotById(string $id)
Get pluginslot by id.

References $component_repository, getPlugin(), and ilComponentRepository\getPluginSlotById().

+ Here is the call graph for this function:

◆ txt()

ilObjectPluginGUI::txt ( string  $a_var)
finalprotected

Definition at line 212 of file class.ilObjectPluginGUI.php.

212 : string
213 {
214 return $this->getPlugin()->txt($a_var);
215 }

References getPlugin().

Referenced by getCreationFormTitle().

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

Field Documentation

◆ $component_factory

ilComponentFactory ilObjectPluginGUI::$component_factory
protected

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

◆ $component_repository

ilComponentRepository ilObjectPluginGUI::$component_repository
protected

Definition at line 27 of file class.ilObjectPluginGUI.php.

Referenced by supportsExport().

◆ $nav_history

ilNavigationHistory ilObjectPluginGUI::$nav_history
protected

Definition at line 28 of file class.ilObjectPluginGUI.php.

Referenced by executeCommand().

◆ $plugin

ilPlugin ilObjectPluginGUI::$plugin = null
protected

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

Referenced by getPlugin().

◆ $slot_request

PluginSlotGUIRequest ilObjectPluginGUI::$slot_request
protected

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

◆ $tabs

ilTabsGUI ilObjectPluginGUI::$tabs
protected

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