ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilObjBadgeAdministrationGUI Class Reference

@ilCtrl_Calls ilObjBadgeAdministrationGUI: ilPermissionGUI, ilBadgeManagementGUI @ilCtrl_IsCalledBy ilObjBadgeAdministrationGUI: ilAdministrationGUI More...

+ Inheritance diagram for ilObjBadgeAdministrationGUI:
+ Collaboration diagram for ilObjBadgeAdministrationGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getSafePostCommands ()
 This method must return a list of safe POST commands. More...
 
 getUnsafeGetCommands ()
 This method must return a list of unsafe GET commands. 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)
 
 getUnsafeGetCommands ()
 This method must return a list of unsafe GET commands. More...
 
 getSafePostCommands ()
 This method must return a list of safe POST commands. More...
 

Data Fields

const string TABLE_ALL_OBJECTS_ACTION = 'ALL_OBJECTS'
 
- 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]
 

Private Member Functions

 getTableAction ()
 
 handleTableActionsCmd ()
 
 assertActive ()
 
 editSettingsCmd (?ilPropertyFormGUI $a_form=null)
 
 saveSettingsCmd ()
 
 initFormSettings ()
 
 listTypesCmd ()
 
 activateTypes ()
 
 deactivateTypes ()
 
 listImageTemplatesCmd ()
 
 addImageTemplateCmd (?ilPropertyFormGUI $a_form=null)
 
 initImageTemplateForm (string $a_mode)
 
 saveImageTemplateCmd ()
 
 editImageTemplate (?ilPropertyFormGUI $a_form=null)
 
 setImageTemplateFormValues (ilPropertyFormGUI $a_form, ilBadgeImageTemplate $a_tmpl)
 
 updateImageTemplateCmd ()
 
 confirmDeleteImageTemplates ()
 
 deleteImageTemplatesCmd ()
 
 listObjectBadgeUsers ()
 
 listObjectBadgesCmd ()
 
 getObjectBadgesFromMultiAction ()
 
 toggleObjectBadges (bool $a_status)
 
 activateObjectBadges ()
 
 deactivateObjectBadges ()
 
 confirmDeleteObjectBadges ()
 
 deleteObjectBadgesCmd ()
 

Private Attributes

const string LIST_TYPES_ACTION = 'listTypes'
 
const string LIST_IMG_TPL_ACTION = 'listImageTemplates'
 
const string LIST_OBJ_BADGES_ACTION = 'listObjectBadges'
 
const string EDIT_SETTINGS_ACTION = 'editSettings'
 
const string SAVE_SETTINGS_ACTION = 'saveSettings'
 
const string SAVE_IMG_TPL_ACTION = 'saveImageTemplate'
 
const string UPDATE_IMG_TPL_ACTION = 'updateImageTemplate'
 
const string ADD_IMG_TPL_ACTION = 'addImageTemplate'
 
const string DELETE_IMG_TPL_ACTION = 'deleteImageTemplates'
 
const string DELETE_OBJ_BADGES_ACTION = 'deleteObjectBadges'
 
const string DEFAULT_ACTION = self::EDIT_SETTINGS_ACTION
 
const string TABLE_ACTIONS = 'handleTableActions'
 
ilRbacSystem $rbacsystem
 
ilBadgeGUIRequest $badge_request
 
ilTabsGUI $tabs
 

Additional Inherited Members

- 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 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 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 = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjBadgeAdministrationGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)

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

53 {
54 global $DIC;
55
56 $this->rbacsystem = $DIC->rbac()->system();
57 $this->ctrl = $DIC->ctrl();
58 $this->access = $DIC->access();
59 $this->lng = $DIC->language();
60 $this->toolbar = $DIC->toolbar();
61 $this->tpl = $DIC['tpl'];
62 $this->tabs = $DIC->tabs();
63 $this->type = 'bdga';
64 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
65
66 $this->badge_request = new ilBadgeGUIRequest(
67 $DIC->http(),
68 $DIC->refinery()
69 );
70
71 $this->lng->loadLanguageModule('badge');
72 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateObjectBadges()

ilObjBadgeAdministrationGUI::activateObjectBadges ( )
private

Definition at line 658 of file class.ilObjBadgeAdministrationGUI.php.

658 : void
659 {
660 $this->toggleObjectBadges(true);
661 }

Referenced by handleTableActionsCmd().

+ Here is the caller graph for this function:

◆ activateTypes()

ilObjBadgeAdministrationGUI::activateTypes ( )
private

Definition at line 264 of file class.ilObjBadgeAdministrationGUI.php.

264 : void
265 {
266 $this->assertActive();
267
268 $tmpl_ids = $this->badge_request->getMultiActionBadgeIdsFromUrl();
269 if ($this->checkPermissionBool('write') && count($tmpl_ids) > 0) {
271 $change_state = [];
272 foreach ($handler->getInactiveTypes() as $type) {
273 if (!in_array($type, $tmpl_ids)) {
274 $change_state[] = $type;
275 }
276 }
277
278 if (current($tmpl_ids) === self::TABLE_ALL_OBJECTS_ACTION) {
279 $handler->setInactiveTypes([]);
280 } else {
281 $handler->setInactiveTypes($change_state);
282 }
283
284 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
285 }
286
287 $this->ctrl->redirect($this, self::LIST_TYPES_ACTION);
288 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
$handler
Definition: oai.php:31

References $handler, ilObjectGUI\$type, assertActive(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), and ILIAS\Repository\lng().

Referenced by handleTableActionsCmd().

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

◆ addImageTemplateCmd()

ilObjBadgeAdministrationGUI::addImageTemplateCmd ( ?ilPropertyFormGUI  $a_form = null)
private

Definition at line 345 of file class.ilObjBadgeAdministrationGUI.php.

347 : void {
348 $this->checkPermission('write');
349
350 $this->assertActive();
351 $this->tabs_gui->setTabActive('imgtmpl');
352
353 if (!$a_form) {
354 $a_form = $this->initImageTemplateForm('create');
355 }
356
357 $this->tpl->setContent($a_form->getHTML());
358 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

◆ assertActive()

ilObjBadgeAdministrationGUI::assertActive ( )
private

Definition at line 191 of file class.ilObjBadgeAdministrationGUI.php.

191 : void
192 {
193 if (!ilBadgeHandler::getInstance()->isActive()) {
194 $this->ctrl->redirect($this, self::DEFAULT_ACTION);
195 }
196 }

References ILIAS\Repository\ctrl(), and ilBadgeHandler\getInstance().

Referenced by activateTypes(), deactivateTypes(), executeCommand(), listImageTemplatesCmd(), and listTypesCmd().

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

◆ confirmDeleteImageTemplates()

ilObjBadgeAdministrationGUI::confirmDeleteImageTemplates ( )
private

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

524 : void
525 {
526 $this->checkPermission('write');
527
528 $tmpl_ids = $this->badge_request->getBadgeAssignableUsers();
529 if ($tmpl_ids === [self::TABLE_ALL_OBJECTS_ACTION]) {
530 $tmpl_ids = [];
531 foreach (ilBadgeImageTemplate::getInstances() as $template) {
532 $tmpl_ids[] = $template->getId();
533 }
534 }
535
536 if (!$tmpl_ids) {
537 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
538 }
539
540 $this->tabs->clearTargets();
541 $this->tabs->setBackTarget(
542 $this->lng->txt('back'),
543 $this->ctrl->getLinkTarget($this, self::LIST_IMG_TPL_ACTION)
544 );
545
546 $confirmation_gui = new ilConfirmationGUI();
547 $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
548 $confirmation_gui->setHeaderText($this->lng->txt('badge_template_deletion_confirmation'));
549 $confirmation_gui->setCancel($this->lng->txt('cancel'), self::LIST_IMG_TPL_ACTION);
550 $confirmation_gui->setConfirm($this->lng->txt('delete'), self::DELETE_IMG_TPL_ACTION);
551
552 foreach ($tmpl_ids as $tmpl_id) {
553 $tmpl = new ilBadgeImageTemplate($tmpl_id);
554 $confirmation_gui->addItem('id[]', $tmpl_id, $tmpl->getTitle());
555 }
556
557 $this->tpl->setContent($confirmation_gui->getHTML());
558 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), ilBadgeImageTemplate\getInstances(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by handleTableActionsCmd().

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

◆ confirmDeleteObjectBadges()

ilObjBadgeAdministrationGUI::confirmDeleteObjectBadges ( )
private

Definition at line 668 of file class.ilObjBadgeAdministrationGUI.php.

668 : void
669 {
670 $badge_ids = $this->badge_request->getMultiActionBadgeIdsFromUrl();
671
672 $this->tabs->clearTargets();
673 $this->tabs->setBackTarget(
674 $this->lng->txt('back'),
675 $this->ctrl->getLinkTarget($this, self::LIST_OBJ_BADGES_ACTION)
676 );
677
678 $confirmation_gui = new ilConfirmationGUI();
679 $confirmation_gui->setFormAction($this->ctrl->getFormAction($this));
680 $confirmation_gui->setHeaderText($this->lng->txt('badge_deletion_confirmation'));
681 $confirmation_gui->setCancel($this->lng->txt('cancel'), self::LIST_OBJ_BADGES_ACTION);
682 $confirmation_gui->setConfirm($this->lng->txt('delete'), self::DELETE_OBJ_BADGES_ACTION);
683
684 if ($badge_ids === [self::TABLE_ALL_OBJECTS_ACTION]) {
685 $badge_ids = [];
686 $filter = [
687 'type' => '',
688 'title' => '',
689 'object' => ''
690 ];
691 foreach (ilBadge::getObjectInstances($filter) as $badge_item) {
692 $badge_ids[] = $badge_item['id'];
693 }
694 }
695 foreach ($badge_ids as $badge_id) {
696 $badge = new ilBadge($badge_id);
697 $parent = $badge->getParentMeta();
698
699 $container = '(' . $parent['type'] . '/' .
700 $parent['id'] . ') ' .
701 $parent['title'];
702 if ($parent['deleted']) {
703 $container .= ' <span class="il_ItemAlertProperty">' . $this->lng->txt('deleted') . '</span>';
704 }
705
706 $confirmation_gui->addItem(
707 'id[]',
708 $badge_id,
709 $container . ' - ' .
710 $badge->getTitle() .
711 ' (' . count(ilBadgeAssignment::getInstancesByBadgeId($badge_id)) . ')'
712 );
713 }
714
715 $this->tpl->setContent($confirmation_gui->getHTML());
716 }
static getInstancesByBadgeId(int $a_badge_id)
static getObjectInstances(?array $filter=null)
$container
@noRector
Definition: wac.php:37

References $container, ILIAS\Repository\ctrl(), ilBadgeAssignment\getInstancesByBadgeId(), ilBadge\getObjectInstances(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by handleTableActionsCmd().

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

◆ deactivateObjectBadges()

ilObjBadgeAdministrationGUI::deactivateObjectBadges ( )
private

Definition at line 663 of file class.ilObjBadgeAdministrationGUI.php.

663 : void
664 {
665 $this->toggleObjectBadges(false);
666 }

Referenced by handleTableActionsCmd().

+ Here is the caller graph for this function:

◆ deactivateTypes()

ilObjBadgeAdministrationGUI::deactivateTypes ( )
private

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

290 : void
291 {
292 $this->assertActive();
293
294 $tmpl_ids = $this->badge_request->getMultiActionBadgeIdsFromUrl();
295 if ($this->checkPermissionBool('write') && count($tmpl_ids) > 0) {
297 $change_state = [];
298 foreach ($handler->getInactiveTypes() as $type) {
299 if (!in_array($type, $tmpl_ids)) {
300 $change_state[] = $type;
301 }
302 }
303
304 $res = [];
305 if (current($tmpl_ids) === self::TABLE_ALL_OBJECTS_ACTION) {
306 $types = $handler->getAvailableTypes(false);
307 foreach ($types as $id => $type) {
308 $res[] = $id;
309 }
310 $handler->setInactiveTypes($res);
311 } else {
312 $handler->setInactiveTypes($change_state);
313 }
314 $inactive = array_merge($handler->getInactiveTypes(), $tmpl_ids);
315 $handler->setInactiveTypes($inactive);
316
317 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
318 }
319
320 $this->ctrl->redirect($this, self::LIST_TYPES_ACTION);
321 }
$res
Definition: ltiservices.php:69

References $handler, ilObjectGUI\$id, $res, ilObjectGUI\$type, assertActive(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), and ILIAS\Repository\lng().

Referenced by handleTableActionsCmd().

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

◆ deleteImageTemplatesCmd()

ilObjBadgeAdministrationGUI::deleteImageTemplatesCmd ( )
private

Definition at line 560 of file class.ilObjBadgeAdministrationGUI.php.

560 : void
561 {
562 $tmpl_ids = $this->badge_request->getIds();
563
564 if ($this->checkPermissionBool('write') && count($tmpl_ids) > 0) {
565 if (current($tmpl_ids) === self::TABLE_ALL_OBJECTS_ACTION) {
566 $tmpl_ids = [];
567 foreach (ilBadgeImageTemplate::getInstances() as $template) {
568 $tmpl_ids[] = $template->getId();
569 }
570 }
571 foreach ($tmpl_ids as $tmpl_id) {
572 $tmpl = new ilBadgeImageTemplate((int) $tmpl_id);
573 $tmpl->delete();
574 }
575 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('badge_deletion'), true);
576 } else {
577 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('badge_select_one'), true);
578 }
579
580 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
581 }

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

+ Here is the call graph for this function:

◆ deleteObjectBadgesCmd()

ilObjBadgeAdministrationGUI::deleteObjectBadgesCmd ( )
private

Definition at line 718 of file class.ilObjBadgeAdministrationGUI.php.

718 : void
719 {
720 $badge_ids = $this->badge_request->getMultiActionBadgeIdsFromPost();
721
722 foreach ($badge_ids as $badge_id) {
723 $badge = new ilBadge($badge_id);
724 $badge->delete();
725 }
726
727 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
728 $this->ctrl->redirect($this, self::LIST_OBJ_BADGES_ACTION);
729 }

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

+ Here is the call graph for this function:

◆ editImageTemplate()

ilObjBadgeAdministrationGUI::editImageTemplate ( ?ilPropertyFormGUI  $a_form = null)
private

Definition at line 435 of file class.ilObjBadgeAdministrationGUI.php.

437 : void {
438 $this->checkPermission('write');
439
440 $this->assertActive();
441 $this->tabs_gui->setTabActive('imgtmpl');
442
443 $tmpl_ids = $this->badge_request->getMultiActionBadgeIdsFromUrl();
444 if (count($tmpl_ids) !== 1) {
445 $tmpl_id = $this->badge_request->getTemplateId();
446 if (!$tmpl_id) {
447 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
448 }
449
450 $tmpl_ids = [$tmpl_id];
451 }
452
453 $template_id = (int) array_pop($tmpl_ids);
454 $this->ctrl->setParameter($this, 'tid', $template_id);
455
456 $tmpl = new ilBadgeImageTemplate($template_id);
457
458 if (!$a_form) {
459 $a_form = $this->initImageTemplateForm('edit');
460 $this->setImageTemplateFormValues($a_form, $tmpl);
461 }
462
463 $this->tpl->setContent($a_form->getHTML());
464 }
setImageTemplateFormValues(ilPropertyFormGUI $a_form, ilBadgeImageTemplate $a_tmpl)

Referenced by handleTableActionsCmd().

+ Here is the caller graph for this function:

◆ editSettingsCmd()

ilObjBadgeAdministrationGUI::editSettingsCmd ( ?ilPropertyFormGUI  $a_form = null)
private

Definition at line 202 of file class.ilObjBadgeAdministrationGUI.php.

202 : void
203 {
204 $this->tabs_gui->setTabActive('settings');
205
206 if (!$a_form) {
207 $a_form = $this->initFormSettings();
208 }
209
210 $this->tpl->setContent($a_form->getHTML());
211 }

References initFormSettings().

Referenced by saveSettingsCmd().

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

◆ executeCommand()

ilObjBadgeAdministrationGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 74 of file class.ilObjBadgeAdministrationGUI.php.

74 : void
75 {
76 $next_class = $this->ctrl->getNextClass($this) ?? '';
77 $cmd = $this->ctrl->getCmd() ?? '';
78
79 $this->prepareOutput();
80
81 switch (strtolower($next_class)) {
82 case strtolower(ilPermissionGUI::class):
83 $this->tabs_gui->setTabActive('perm_settings');
84 $perm_gui = new ilPermissionGUI($this);
85 $this->ctrl->forwardCommand($perm_gui);
86 break;
87
88 case strtolower(ilBadgeManagementGUI::class):
89 $this->assertActive();
90 $this->tabs_gui->setTabActive('activity');
91 $gui = new ilBadgeManagementGUI($this->ref_id, $this->obj_id, $this->type);
92 $this->ctrl->forwardCommand($gui);
93 break;
94
95 default:
96 if ($cmd === '' || $cmd === null || $cmd === 'view' || !method_exists($this, $cmd . 'Cmd')) {
98 }
99 $cmd .= 'Cmd';
100
101 if ($this->badge_request->getBadgeIdFromUrl()) {
102 $this->ctrl->setParameter($this, 'tid', $this->badge_request->getBadgeIdFromUrl());
103 }
104
105 $this->$cmd();
106 break;
107 }
108 }
@ilCtrl_Calls ilBadgeManagementGUI: ilPropertyFormGUI
prepareOutput(bool $show_sub_objects=true)

References assertActive(), ILIAS\Repository\ctrl(), DEFAULT_ACTION, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjBadgeAdministrationGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 110 of file class.ilObjBadgeAdministrationGUI.php.

110 : void
111 {
112 if ($this->rbacsystem->checkAccess('read', $this->object->getRefId())) {
113 $this->tabs_gui->addTab(
114 'settings',
115 $this->lng->txt('settings'),
116 $this->ctrl->getLinkTarget($this, self::EDIT_SETTINGS_ACTION)
117 );
118
119 if (ilBadgeHandler::getInstance()->isActive()) {
120 $this->tabs_gui->addTab(
121 'types',
122 $this->lng->txt('badge_types'),
123 $this->ctrl->getLinkTarget($this, self::LIST_TYPES_ACTION)
124 );
125
126 $this->tabs_gui->addTab(
127 'imgtmpl',
128 $this->lng->txt('badge_image_templates'),
129 $this->ctrl->getLinkTarget($this, self::LIST_IMG_TPL_ACTION)
130 );
131
132 $this->tabs_gui->addTab(
133 'activity',
134 $this->lng->txt('badge_activity_badges'),
135 $this->ctrl->getLinkTargetByClass('ilbadgemanagementgui', '')
136 );
137
138 $this->tabs_gui->addTab(
139 'obj_badges',
140 $this->lng->txt('badge_object_badges'),
141 $this->ctrl->getLinkTarget($this, self::LIST_OBJ_BADGES_ACTION)
142 );
143 }
144 }
145
146 if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
147 $this->tabs_gui->addTab(
148 'perm_settings',
149 $this->lng->txt('perm_settings'),
150 $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm')
151 );
152 }
153 }

References ilBadgeHandler\getInstance(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getObjectBadgesFromMultiAction()

ilObjBadgeAdministrationGUI::getObjectBadgesFromMultiAction ( )
private

Definition at line 626 of file class.ilObjBadgeAdministrationGUI.php.

626 : array
627 {
628 $badge_ids = $this->badge_request->getMultiActionBadgeIdsFromUrl();
629 if (!$badge_ids ||
630 !$this->access->checkAccess('write', '', $this->object->getRefId())) {
631 $this->ctrl->redirect($this, self::LIST_OBJ_BADGES_ACTION);
632 }
633
634 return $badge_ids;
635 }

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

+ Here is the call graph for this function:

◆ getSafePostCommands()

ilObjBadgeAdministrationGUI::getSafePostCommands ( )

This method must return a list of safe POST commands.

Safe post commands returned by this method will no longer be CSRF protected and will NOT be appended by an ilCtrlToken.

Returns
string[]

Implements ilCtrlSecurityInterface.

Definition at line 155 of file class.ilObjBadgeAdministrationGUI.php.

155 : array
156 {
157 return [];
158 }

◆ getTableAction()

ilObjBadgeAdministrationGUI::getTableAction ( )
private

Definition at line 160 of file class.ilObjBadgeAdministrationGUI.php.

160 : ?string
161 {
162 return $this->http->wrapper()->query()->retrieve(
163 'tid_table_action',
164 $this->refinery->byTrying([
165 $this->refinery->kindlyTo()->string(),
166 $this->refinery->always(null)
167 ])
168 );
169 }
static http()
Fetches the global http state from ILIAS.

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

Referenced by handleTableActionsCmd().

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

◆ getUnsafeGetCommands()

ilObjBadgeAdministrationGUI::getUnsafeGetCommands ( )

This method must return a list of unsafe GET commands.

Unsafe get commands returned by this method will now be CSRF protected, which means an ilCtrlToken is appended each time a link-target is generated to the class implementing this interface with a command from that list.

Tokens will be validated in

See also
ilCtrlInterface::getCmd(), whereas the fallback command will be used if the CSRF validation fails.
Returns
string[]

Implements ilCtrlSecurityInterface.

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

186 : array
187 {
188 return [self::TABLE_ACTIONS];
189 }

References TABLE_ACTIONS.

◆ handleTableActionsCmd()

ilObjBadgeAdministrationGUI::handleTableActionsCmd ( )
private

Definition at line 171 of file class.ilObjBadgeAdministrationGUI.php.

171 : void
172 {
173 match ($this->getTableAction()) {
174 'badge_type_activate' => $this->activateTypes(),
175 'badge_type_deactivate' => $this->deactivateTypes(),
176 'badge_image_template_editImageTemplate', 'obj_badge_user' => $this->editImageTemplate(),
177 'obj_badge_activate' => $this->activateObjectBadges(),
178 'obj_badge_deactivate' => $this->deactivateObjectBadges(),
179 'obj_badge_show_users' => $this->listObjectBadgeUsers(),
180 'badge_image_template_delete' => $this->confirmDeleteImageTemplates(),
181 'obj_badge_delete' => $this->confirmDeleteObjectBadges(),
182 default => $this->ctrl->redirect($this, self::DEFAULT_ACTION),
183 };
184 }
editImageTemplate(?ilPropertyFormGUI $a_form=null)

References activateObjectBadges(), activateTypes(), confirmDeleteImageTemplates(), confirmDeleteObjectBadges(), ILIAS\Repository\ctrl(), deactivateObjectBadges(), deactivateTypes(), editImageTemplate(), getTableAction(), and listObjectBadgeUsers().

+ Here is the call graph for this function:

◆ initFormSettings()

ilObjBadgeAdministrationGUI::initFormSettings ( )
private

Definition at line 230 of file class.ilObjBadgeAdministrationGUI.php.

231 {
232 $form = new ilPropertyFormGUI();
233 $form->setFormAction($this->ctrl->getFormAction($this, self::SAVE_SETTINGS_ACTION));
234 $form->setTitle($this->lng->txt('badge_settings'));
235
236 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
237 $form->addCommandButton(self::SAVE_SETTINGS_ACTION, $this->lng->txt('save'));
238 $form->addCommandButton(self::EDIT_SETTINGS_ACTION, $this->lng->txt('cancel'));
239 }
240
241 $act = new ilCheckboxInputGUI($this->lng->txt('badge_service_activate'), 'act');
242 $act->setInfo($this->lng->txt('badge_service_activate_info'));
243 $form->addItem($act);
244
246 $act->setChecked($handler->isActive());
247
248 return $form;
249 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.

References $handler, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), and ILIAS\Repository\lng().

Referenced by editSettingsCmd(), and saveSettingsCmd().

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

◆ initImageTemplateForm()

ilObjBadgeAdministrationGUI::initImageTemplateForm ( string  $a_mode)
private

Definition at line 360 of file class.ilObjBadgeAdministrationGUI.php.

363 $form = new ilPropertyFormGUI();
364 if ($a_mode === 'create') {
365 $form->setFormAction($this->ctrl->getFormAction($this, self::SAVE_IMG_TPL_ACTION));
366 } else {
367 $form->setFormAction($this->ctrl->getFormAction($this, self::UPDATE_IMG_TPL_ACTION));
368 }
369 $form->setTitle($this->lng->txt('badge_image_template_form'));
370
371 $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
372 $title->setMaxLength(255);
373 $title->setRequired(true);
374 $form->addItem($title);
375
376 $img = new ilImageFileInputGUI($this->lng->txt('image'), 'img');
377 $img->setSuffixes(['png', 'svg']);
378 if ($a_mode === 'create') {
379 $img->setRequired(true);
380 }
381 $img->setUseCache(false);
382 $img->setAllowDeletion(false);
383 $form->addItem($img);
384
385 $types_mode = new ilRadioGroupInputGUI($this->lng->txt('badge_template_types'), 'tmode');
386 $types_mode->setRequired(true);
387 $types_mode->setValue('all');
388 $form->addItem($types_mode);
389
390 $type_all = new ilRadioOption($this->lng->txt('badge_template_types_all'), 'all');
391 $types_mode->addOption($type_all);
392
393 $type_spec = new ilRadioOption($this->lng->txt('badge_template_types_specific'), 'spec');
394 $types_mode->addOption($type_spec);
395
396 $types = new ilCheckboxGroupInputGUI($this->lng->txt('badge_types'), 'type');
397 $types->setRequired(true);
398 $type_spec->addSubItem($types);
399
400 foreach (ilBadgeHandler::getInstance()->getAvailableTypes(false) as $id => $type) {
401 $types->addOption(new ilCheckboxOption($type->getCaption(), $id));
402 }
403
404 if ($a_mode === 'create') {
405 $form->addCommandButton(self::SAVE_IMG_TPL_ACTION, $this->lng->txt('save'));
406 } else {
407 $form->addCommandButton(self::UPDATE_IMG_TPL_ACTION, $this->lng->txt('save'));
408 }
409 $form->addCommandButton(self::LIST_IMG_TPL_ACTION, $this->lng->txt('cancel'));
410
411 return $form;
412 }
This class represents a property in a property form.
This class represents an option in a checkbox group.
This class represents an image file property in a property form.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text property in a property form.

References ILIAS\Repository\ctrl(), and ilFormGUI\setFormAction().

+ Here is the call graph for this function:

◆ listImageTemplatesCmd()

ilObjBadgeAdministrationGUI::listImageTemplatesCmd ( )
private

Definition at line 327 of file class.ilObjBadgeAdministrationGUI.php.

327 : void
328 {
329 $this->assertActive();
330 $this->tabs_gui->setTabActive('imgtmpl');
331
332 if ($this->checkPermissionBool('write')) {
333 $this->toolbar->addButton(
334 $this->lng->txt('badge_add_template'),
335 $this->ctrl->getLinkTarget($this, self::ADD_IMG_TPL_ACTION)
336 );
337 }
338
339 $template_table = new ilBadgeImageTemplateTableGUI(
340 $this->access->checkAccess('write', '', $this->object->getRefId())
341 );
342 $template_table->renderTable(ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTarget($this, self::TABLE_ACTIONS));
343 }

References ILIAS\Repository\access(), assertActive(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

◆ listObjectBadgesCmd()

ilObjBadgeAdministrationGUI::listObjectBadgesCmd ( )
private

Definition at line 613 of file class.ilObjBadgeAdministrationGUI.php.

613 : void
614 {
615 $this->assertActive();
616 $this->tabs_gui->setTabActive('obj_badges');
617
618 $tbl = new ilObjectBadgeTableGUI($this, $this->access->checkAccess('write', '', $this->object->getRefId()));
619 $tbl->renderTable(ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTarget($this, self::TABLE_ACTIONS));
620 }

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

+ Here is the call graph for this function:

◆ listObjectBadgeUsers()

ilObjBadgeAdministrationGUI::listObjectBadgeUsers ( )
private

Definition at line 587 of file class.ilObjBadgeAdministrationGUI.php.

587 : void
588 {
589 $parent_obj_id = $this->badge_request->getParentId();
590 if (!$parent_obj_id && $this->badge_request->getBadgeIdFromUrl()) {
591 // In this case, we want't to list the users that have been awarded a specific badge
592 $badge = new ilBadge($this->badge_request->getBadgeIdFromUrl());
593 $parent_obj_id = $badge->getParentId();
594 }
595 if (!$parent_obj_id) {
596 $this->ctrl->redirect($this, self::LIST_OBJ_BADGES_ACTION);
597 }
598
599 $this->assertActive();
600
601 $this->tabs_gui->clearTargets();
602 $this->tabs_gui->setBackTarget(
603 $this->lng->txt('back'),
604 $this->ctrl->getLinkTarget($this, self::LIST_OBJ_BADGES_ACTION)
605 );
606
607 $this->ctrl->saveParameter($this, 'pid');
608
609 $tbl = new ilBadgeUserTableGUI(null, null, $parent_obj_id, $this->badge_request->getBadgeId());
610 $tbl->renderTable(ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTarget($this, self::TABLE_ACTIONS));
611 }

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

Referenced by handleTableActionsCmd().

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

◆ listTypesCmd()

ilObjBadgeAdministrationGUI::listTypesCmd ( )
private

Definition at line 255 of file class.ilObjBadgeAdministrationGUI.php.

255 : void
256 {
257 $this->assertActive();
258 $this->tabs_gui->setTabActive('types');
259
260 $tpl = new ilBadgeTypesTableGUI($this->access->checkAccess('write', '', $this->object->getRefId()));
261 $tpl->renderTable(ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTarget($this, self::TABLE_ACTIONS));
262 }
ilGlobalTemplateInterface $tpl

References ilObjectGUI\$tpl, ILIAS\Repository\access(), assertActive(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ saveImageTemplateCmd()

ilObjBadgeAdministrationGUI::saveImageTemplateCmd ( )
private

Definition at line 414 of file class.ilObjBadgeAdministrationGUI.php.

414 : void
415 {
416 $this->checkPermission('write');
417
418 $form = $this->initImageTemplateForm('create');
419 if ($form->checkInput()) {
420 $tmpl = new ilBadgeImageTemplate();
421 $tmpl->setTitle($form->getInput('title'));
422 $tmpl->setTypes($form->getInput('type'));
423 $tmpl->create();
424
425 $tmpl->processImageUpload($tmpl);
426
427 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
428 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
429 }
430
431 $form->setValuesByPost();
432 $this->addImageTemplateCmd($form);
433 }
addImageTemplateCmd(?ilPropertyFormGUI $a_form=null)

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

+ Here is the call graph for this function:

◆ saveSettingsCmd()

ilObjBadgeAdministrationGUI::saveSettingsCmd ( )
private

Definition at line 213 of file class.ilObjBadgeAdministrationGUI.php.

213 : void
214 {
215 $this->checkPermission('write');
216
217 $form = $this->initFormSettings();
218 if ($form->checkInput()) {
220 $handler->setActive((bool) $form->getInput('act'));
221
222 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
223 $this->ctrl->redirect($this, self::EDIT_SETTINGS_ACTION);
224 }
225
226 $form->setValuesByPost();
227 $this->editSettingsCmd($form);
228 }
editSettingsCmd(?ilPropertyFormGUI $a_form=null)

References $handler, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), editSettingsCmd(), ilBadgeHandler\getInstance(), initFormSettings(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ setImageTemplateFormValues()

ilObjBadgeAdministrationGUI::setImageTemplateFormValues ( ilPropertyFormGUI  $a_form,
ilBadgeImageTemplate  $a_tmpl 
)
private

Definition at line 466 of file class.ilObjBadgeAdministrationGUI.php.

469 : void {
470 $a_form->getItemByPostVar('title')->setValue($a_tmpl->getTitle());
471 if ($a_tmpl->getImageRid() !== null) {
472 $img = $a_tmpl->getImageFromResourceId();
473 $a_form->getItemByPostVar('img')->setImage($img);
474 $a_form->getItemByPostVar('img')->setValue($a_tmpl->getImageRid());
475 } else {
476 $a_form->getItemByPostVar('img')->setImage($a_tmpl->getImagePath());
477 $a_form->getItemByPostVar('img')->setValue($a_tmpl->getImage());
478 }
479
480 if ($a_tmpl->getTypes()) {
481 $a_form->getItemByPostVar('tmode')->setValue('spec');
482 $a_form->getItemByPostVar('type')->setValue($a_tmpl->getTypes());
483 } else {
484 $a_form->getItemByPostVar('tmode')->setValue('all');
485 }
486 }
getItemByPostVar(string $a_post_var)

References ilBadgeImageTemplate\getImageFromResourceId(), ilBadgeImageTemplate\getImageRid(), and ilPropertyFormGUI\getItemByPostVar().

+ Here is the call graph for this function:

◆ toggleObjectBadges()

ilObjBadgeAdministrationGUI::toggleObjectBadges ( bool  $a_status)
private

Definition at line 637 of file class.ilObjBadgeAdministrationGUI.php.

637 : void
638 {
639 $badge_ids = $this->getObjectBadgesFromMultiAction();
640 if (current($badge_ids) === self::TABLE_ALL_OBJECTS_ACTION) {
641 $filter = ['type' => '' , 'title' => '', 'object' => ''];
642 $badge_ids = [];
643 foreach (ilBadge::getObjectInstances($filter) as $badge_item) {
644 $badge_ids[] = $badge_item['id'];
645 }
646 }
647
648 foreach ($badge_ids as $badge_id) {
649 $badge = new ilBadge($badge_id);
650 $badge->setActive($a_status);
651 $badge->update();
652 }
653
654 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
655 $this->ctrl->redirect($this, self::LIST_OBJ_BADGES_ACTION);
656 }

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

+ Here is the call graph for this function:

◆ updateImageTemplateCmd()

ilObjBadgeAdministrationGUI::updateImageTemplateCmd ( )
private

Definition at line 488 of file class.ilObjBadgeAdministrationGUI.php.

488 : void
489 {
490 $this->checkPermission('write');
491
492 $tmpl_id = $this->badge_request->getTemplateId();
493 if (!$tmpl_id) {
494 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
495 }
496
497 $this->ctrl->setParameter($this, 'tid', $tmpl_id);
498
499 $tmpl = new ilBadgeImageTemplate($tmpl_id);
500
501 $form = $this->initImageTemplateForm('update');
502 if ($form->checkInput()) {
503 $tmpl->setTitle($form->getInput('title'));
504
505 if ($form->getInput('tmode') !== 'all') {
506 $tmpl->setTypes($form->getInput('type'));
507 } else {
508 $tmpl->setTypes(null);
509 }
510
511 $tmpl->update();
512
513 $tmpl->processImageUpload($tmpl);
514
515 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('settings_saved'), true);
516 $this->ctrl->redirect($this, self::LIST_IMG_TPL_ACTION);
517 }
518
519 $this->setImageTemplateFormValues($form, $tmpl);
520 $form->setValuesByPost();
521 $this->editImageTemplate($form);
522 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $badge_request

ilBadgeGUIRequest ilObjBadgeAdministrationGUI::$badge_request
private

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

◆ $rbacsystem

ilRbacSystem ilObjBadgeAdministrationGUI::$rbacsystem
private

Definition at line 44 of file class.ilObjBadgeAdministrationGUI.php.

◆ $tabs

ilTabsGUI ilObjBadgeAdministrationGUI::$tabs
private

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

◆ ADD_IMG_TPL_ACTION

const string ilObjBadgeAdministrationGUI::ADD_IMG_TPL_ACTION = 'addImageTemplate'
private

Definition at line 37 of file class.ilObjBadgeAdministrationGUI.php.

◆ DEFAULT_ACTION

const string ilObjBadgeAdministrationGUI::DEFAULT_ACTION = self::EDIT_SETTINGS_ACTION
private

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

Referenced by executeCommand().

◆ DELETE_IMG_TPL_ACTION

const string ilObjBadgeAdministrationGUI::DELETE_IMG_TPL_ACTION = 'deleteImageTemplates'
private

Definition at line 38 of file class.ilObjBadgeAdministrationGUI.php.

◆ DELETE_OBJ_BADGES_ACTION

const string ilObjBadgeAdministrationGUI::DELETE_OBJ_BADGES_ACTION = 'deleteObjectBadges'
private

Definition at line 39 of file class.ilObjBadgeAdministrationGUI.php.

◆ EDIT_SETTINGS_ACTION

const string ilObjBadgeAdministrationGUI::EDIT_SETTINGS_ACTION = 'editSettings'
private

Definition at line 33 of file class.ilObjBadgeAdministrationGUI.php.

◆ LIST_IMG_TPL_ACTION

const string ilObjBadgeAdministrationGUI::LIST_IMG_TPL_ACTION = 'listImageTemplates'
private

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

◆ LIST_OBJ_BADGES_ACTION

const string ilObjBadgeAdministrationGUI::LIST_OBJ_BADGES_ACTION = 'listObjectBadges'
private

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

◆ LIST_TYPES_ACTION

const string ilObjBadgeAdministrationGUI::LIST_TYPES_ACTION = 'listTypes'
private

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

◆ SAVE_IMG_TPL_ACTION

const string ilObjBadgeAdministrationGUI::SAVE_IMG_TPL_ACTION = 'saveImageTemplate'
private

Definition at line 35 of file class.ilObjBadgeAdministrationGUI.php.

◆ SAVE_SETTINGS_ACTION

const string ilObjBadgeAdministrationGUI::SAVE_SETTINGS_ACTION = 'saveSettings'
private

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

◆ TABLE_ACTIONS

const string ilObjBadgeAdministrationGUI::TABLE_ACTIONS = 'handleTableActions'
private

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

Referenced by getUnsafeGetCommands().

◆ TABLE_ALL_OBJECTS_ACTION

const string ilObjBadgeAdministrationGUI::TABLE_ALL_OBJECTS_ACTION = 'ALL_OBJECTS'

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

◆ UPDATE_IMG_TPL_ACTION

const string ilObjBadgeAdministrationGUI::UPDATE_IMG_TPL_ACTION = 'updateImageTemplate'
private

Definition at line 36 of file class.ilObjBadgeAdministrationGUI.php.


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