ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilObjRoleFolderGUI Class Reference

Class ilObjRoleFolderGUI. More...

+ Inheritance diagram for ilObjRoleFolderGUI:
+ Collaboration diagram for ilObjRoleFolderGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference)
 Constructor public. More...
 
 executeCommand ()
 
 returnObject ()
 
 viewObject ()
 
 resetFilterObject ()
 Reset role filter. More...
 
 getAdminTabs ()
 Add role folder tabs. More...
 
 editSettingsObject (ilPropertyFormGUI $a_form=null)
 
 saveSettingsObject ()
 
 addToExternalSettingsForm (int $a_form_id)
 
- 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)
 

Protected Member Functions

 initCopySourceFromGET ()
 
 initRolesFromPOST ()
 
 buildTargetNamesString ()
 
 roleSearchObject ()
 Search target roles. More...
 
 initRoleSearchForm ()
 Init role search form. More...
 
 roleSearchFormObject ()
 Parse search query. More...
 
 roleSearchListObject ()
 List roles. More...
 
 chooseCopyBehaviourObject (?ilPropertyFormGUI $form=null)
 Choose option for copying roles/role templates. More...
 
 initCopyBehaviourForm ()
 Show copy behaviour form. More...
 
 adjustRoleObject ()
 Copy role. More...
 
 doAddRolePermissions (int $source, int $target)
 do add role permission More...
 
 removeRolePermissionsObject ()
 Remove role permissions. More...
 
 doRemoveRolePermissions (int $source, int $target)
 do add role permission More...
 
 doCopyRole (int $source, int $target)
 Perform copy of role. More...
 
 doChangeExistingObjects (int $a_start_obj, int $a_target_role, int $a_operation_mode, int $a_source_role)
 Do change existing objects. More...
 
 applyFilterObject ()
 Apply role filter. More...
 
 confirmDeleteObject ()
 Confirm deletion of roles. More...
 
 deleteRoleObject ()
 Delete roles. More...
 
 initSettingsForm ()
 
- 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 ()
 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

ilRbacAdmin $rbacadmin
 
GlobalHttpState $http
 
Factory $refinery
 
UIFactory $ui_factory
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
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
 
ilObjectCustomIconFactory $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 Attributes

const COPY_ADD_PERMISSIONS = 1
 
const COPY_CLONE_PERMISSIONS = 2
 
const COPY_REMOVE_PERMISSIONS = 3
 
const COPY_CHANGE_EXISTING_OBJECTS = 1
 
ilLogger $logger
 

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

Constructor & Destructor Documentation

◆ __construct()

ilObjRoleFolderGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference 
)

Constructor public.

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\refinery().

51  {
52  global $DIC;
53 
54  $this->logger = $DIC->logger()->ac();
55  $this->rbacadmin = $DIC['rbacadmin'];
56  $this->http = $DIC->http();
57  $this->refinery = $DIC->refinery();
58  $this->ui_factory = $DIC['ui.factory'];
59 
60  $this->type = "rolf";
61  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
62  $this->lng->loadLanguageModule('rbac');
63  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjRoleFolderGUI::addToExternalSettingsForm ( int  $a_form_id)

Definition at line 831 of file class.ilObjRoleFolderGUI.php.

References ilSecuritySettings\_getInstance(), ilAdministrationSettingsFormHandler\FORM_PRIVACY, ilAdministrationSettingsFormHandler\FORM_SECURITY, ilPrivacySettings\getInstance(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

831  : array
832  {
833  switch ($a_form_id) {
835 
836  $security = ilSecuritySettings::_getInstance();
837 
838  $fields = ['adm_adm_role_protect' => [$security->isAdminRoleProtected(),
840  ]
841  ];
842 
843  return [["editSettings", $fields]];
844 
846 
847  $privacy = ilPrivacySettings::getInstance();
848 
849  $subitems = null;
850  if ($privacy->enabledRbacLog()) {
851  $subitems = ['rbac_log_age' => $privacy->getRbacLogAge()];
852  }
853  $fields = ['rbac_log' => [$privacy->enabledRbacLog(),
855  $subitems
856  ]
857  ];
858 
859  return [["editSettings", $fields]];
860  }
861  return [];
862  }
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ adjustRoleObject()

ilObjRoleFolderGUI::adjustRoleObject ( )
protected

Copy role.

Definition at line 446 of file class.ilObjRoleFolderGUI.php.

References ilObjectGUI\checkPermission(), chooseCopyBehaviourObject(), ILIAS\Repository\ctrl(), doAddRolePermissions(), doChangeExistingObjects(), doCopyRole(), doRemoveRolePermissions(), initCopyBehaviourForm(), initCopySourceFromGET(), initRolesFromPOST(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ilObjRole\MODE_ADD_OPERATIONS, ilObjRole\MODE_READ_OPERATIONS, and ilObjRole\MODE_REMOVE_OPERATIONS.

446  : void
447  {
448  $this->checkPermission('write');
449 
450  $roles = $this->initRolesFromPOST();
451  $source = $this->initCopySourceFromGET();
452 
453  $form = $this->initCopyBehaviourForm();
454  if (!$form->checkInput()) {
455  $form->setValuesByPost();
456  $this->chooseCopyBehaviourObject($form);
457  return;
458  }
459 
460  $adjustment_type = $form->getInput('type');
461  foreach ((array) $roles as $role_id) {
462  if ($role_id !== $source) {
463  $start_obj = $this->rbac_review->getRoleFolderOfRole($role_id);
464  $this->logger->debug('Start object: ' . $start_obj);
465 
466  switch ($adjustment_type) {
467  case self::COPY_ADD_PERMISSIONS:
468  $change_existing = (bool) $form->getInput('add_ce_type');
469  $this->doAddRolePermissions(
470  $source,
471  $role_id
472  );
473  if ($change_existing) {
475  $start_obj,
476  $role_id,
478  $source
479  );
480  }
481  break;
482  case self::COPY_CLONE_PERMISSIONS:
483  $change_existing = (bool) $form->getInput('clone_ce_type');
484  $this->doCopyRole(
485  $source,
486  $role_id
487  );
488  if ($change_existing) {
490  $start_obj,
491  $role_id,
493  $source
494  );
495  }
496  break;
497  case self::COPY_REMOVE_PERMISSIONS:
498  $change_existing = (bool) $form->getInput('remove_ce_type');
500  $source,
501  $role_id
502  );
503  if ($change_existing) {
505  $start_obj,
506  $role_id,
508  $source
509  );
510  }
511  break;
512  }
513  }
514 
515  $this->tpl->setOnScreenMessage('success', $this->lng->txt('rbac_copy_finished'), true);
516  $this->ctrl->redirect($this, 'view');
517  }
518  }
const MODE_REMOVE_OPERATIONS
const MODE_READ_OPERATIONS
doRemoveRolePermissions(int $source, int $target)
do add role permission
doCopyRole(int $source, int $target)
Perform copy of role.
const MODE_ADD_OPERATIONS
chooseCopyBehaviourObject(?ilPropertyFormGUI $form=null)
Choose option for copying roles/role templates.
doAddRolePermissions(int $source, int $target)
do add role permission
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
doChangeExistingObjects(int $a_start_obj, int $a_target_role, int $a_operation_mode, int $a_source_role)
Do change existing objects.
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjRoleFolderGUI::applyFilterObject ( )
protected

Apply role filter.

Definition at line 631 of file class.ilObjRoleFolderGUI.php.

References viewObject().

631  : void
632  {
633  $table = new ilRoleTableGUI($this, 'view');
634  $table->init();
635  $table->resetOffset();
636  $table->writeFilterToSession();
637 
638  $this->viewObject();
639  }
TableGUI for the presentation og roles and role templates.
+ Here is the call graph for this function:

◆ buildTargetNamesString()

ilObjRoleFolderGUI::buildTargetNamesString ( )
protected

Definition at line 131 of file class.ilObjRoleFolderGUI.php.

References ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), initRolesFromPOST(), and ILIAS\Repository\lng().

Referenced by initCopyBehaviourForm().

131  : string
132  {
133  $targets = $this->initRolesFromPOST();
134 
135  if ($targets === []) {
136  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('rbac_copy_no_targets'), true);
137  $this->ctrl->redirect($this, 'roleSearchList');
138  }
139 
140  if (count($targets) > 3) {
141  return sprintf($this->lng->txt('rbac_copy_multi_targets'), '<strong>' . ilObject::_lookupTitle($targets[0]), ilObject::_lookupTitle($targets[1]) . '</strong>', '<strong>' . (string) count($targets) - 2, '</strong>');
142  }
143 
144  if (count($targets) > 1) {
145  $target_names = '<strong>' . ilObject::_lookupTitle(array_shift($targets));
146  foreach ($targets as $target) {
147  $target_names .= ', ' . ilObject::_lookupTitle($target);
148  }
149  return $target_names . '</strong>';
150  }
151 
152  // we have one single target
153  return '<strong>' . ilObject::_lookupTitle($targets[0]) . '</strong>';
154  }
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chooseCopyBehaviourObject()

ilObjRoleFolderGUI::chooseCopyBehaviourObject ( ?ilPropertyFormGUI  $form = null)
protected

Choose option for copying roles/role templates.

Definition at line 307 of file class.ilObjRoleFolderGUI.php.

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

Referenced by adjustRoleObject().

307  : void
308  {
309  $this->initCopySourceFromGET();
310 
311  $this->ctrl->saveParameter($this, 'csource');
312  $this->tabs_gui->clearTargets();
313  $this->tabs_gui->setBackTarget(
314  $this->lng->txt('rbac_back_to_overview'),
315  $this->ctrl->getLinkTarget($this, 'view')
316  );
317  if (!$form instanceof \ilPropertyFormGUI) {
318  $form = $this->initCopyBehaviourForm();
319  }
320  $this->tpl->setContent($form->getHTML());
321  }
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteObject()

ilObjRoleFolderGUI::confirmDeleteObject ( )
protected

Confirm deletion of roles.

Definition at line 657 of file class.ilObjRoleFolderGUI.php.

References ilObjRole\_getTranslation(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), initRolesFromPOST(), and ILIAS\Repository\lng().

657  : void
658  {
659  $roles = $this->initRolesFromPOST();
660  if ($roles === []) {
661  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
662  $this->ctrl->redirect($this, 'view');
663  }
664 
665  $question = $this->lng->txt('rbac_role_delete_qst');
666 
667  $confirm = new ilConfirmationGUI();
668  $confirm->setHeaderText($question);
669  $confirm->setFormAction($this->ctrl->getFormAction($this));
670  $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
671  $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
672  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
673 
674  foreach ($roles as $role_id) {
675  $confirm->addItem(
676  'roles[]',
677  (string) $role_id,
679  );
680  }
681  $this->tpl->setContent($confirm->getHTML());
682  }
static _lookupTitle(int $obj_id)
static _getTranslation(string $a_role_title)
+ Here is the call graph for this function:

◆ deleteRoleObject()

ilObjRoleFolderGUI::deleteRoleObject ( )
protected

Delete roles.

Definition at line 687 of file class.ilObjRoleFolderGUI.php.

References ilObjectGUI\$id, ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), initRolesFromPOST(), and ILIAS\Repository\lng().

687  : void
688  {
689  if (!$this->rbac_system->checkAccess('delete', $this->object->getRefId())) {
690  $this->error->raiseError(
691  $this->lng->txt('msg_no_perm_delete'),
692  $this->error->MESSAGE
693  );
694  }
695 
696  foreach ($this->initRolesFromPOST() as $id) {
697  // instatiate correct object class (role or rolt)
699 
700  if ($obj->getType() == "role") {
701  $rolf_arr = $this->rbac_review->getFoldersAssignedToRole($obj->getId(), true);
702  $obj->setParent($rolf_arr[0]);
703  }
704 
705  $obj->delete();
706  }
707 
708  // set correct return location if rolefolder is removed
709  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_deleted_roles_rolts"), true);
710  $this->ctrl->redirect($this, 'view');
711  }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ doAddRolePermissions()

ilObjRoleFolderGUI::doAddRolePermissions ( int  $source,
int  $target 
)
protected

do add role permission

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

Referenced by adjustRoleObject().

523  : void
524  {
525  $source_definition = $this->rbac_review->getRoleFolderOfRole($source);
526  $this->rbacadmin->copyRolePermissionUnion(
527  $source,
528  $source_definition,
529  $target,
530  $this->rbac_review->getRoleFolderOfRole($target),
531  $target,
532  $this->rbac_review->getRoleFolderOfRole($target)
533  );
534  }
+ Here is the caller graph for this function:

◆ doChangeExistingObjects()

ilObjRoleFolderGUI::doChangeExistingObjects ( int  $a_start_obj,
int  $a_target_role,
int  $a_operation_mode,
int  $a_source_role 
)
protected

Do change existing objects.

Definition at line 592 of file class.ilObjRoleFolderGUI.php.

References ilLogLevel\DEBUG, ILIAS\Repository\logger(), ilObjRole\MODE_PROTECTED_KEEP_LOCAL_POLICIES, ilObjRole\MODE_READ_OPERATIONS, ilObjRole\MODE_UNPROTECTED_KEEP_LOCAL_POLICIES, and ilLogLevel\WARNING.

Referenced by adjustRoleObject().

597  : void {
598  if (!$a_start_obj) {
599  $this->logger->warning('Missing parameter start object.');
600  $this->logger->logStack(\ilLogLevel::WARNING);
601  throw new InvalidArgumentException('Missing parameter: start object');
602  }
603  // the mode is unchanged and read out from the target object
604  $target_ref_id = $this->rbac_review->getRoleFolderOfRole($a_target_role);
605  if ($this->rbac_review->isProtected($target_ref_id, $a_target_role)) {
607  } else {
609  }
610  $operation_stack = [];
611  if ($a_operation_mode !== \ilObjRole::MODE_READ_OPERATIONS) {
612  $operation_stack[] = $this->rbac_review->getAllOperationsOfRole($a_source_role, $this->ref_id);
613  }
614  $this->logger->debug('Current operation stack');
615  $this->logger->dump($operation_stack, ilLogLevel::DEBUG);
616 
617  $role = new ilObjRole($a_target_role);
618  $role->changeExistingObjects(
619  $a_start_obj,
620  $mode,
621  ['all'],
622  [],
623  $a_operation_mode,
624  $operation_stack
625  );
626  }
Class ilObjRole.
const MODE_PROTECTED_KEEP_LOCAL_POLICIES
const MODE_READ_OPERATIONS
const MODE_UNPROTECTED_KEEP_LOCAL_POLICIES
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doCopyRole()

ilObjRoleFolderGUI::doCopyRole ( int  $source,
int  $target 
)
protected

Perform copy of role.

Definition at line 576 of file class.ilObjRoleFolderGUI.php.

Referenced by adjustRoleObject().

576  : void
577  {
578  $target_obj = $this->rbac_review->getRoleFolderOfRole($target);
579  $source_obj = $this->rbac_review->getRoleFolderOfRole($source);
580  // Copy role template permissions
581  $this->rbacadmin->copyRoleTemplatePermissions(
582  $source,
583  $source_obj,
584  $target_obj,
585  $target
586  );
587  }
+ Here is the caller graph for this function:

◆ doRemoveRolePermissions()

ilObjRoleFolderGUI::doRemoveRolePermissions ( int  $source,
int  $target 
)
protected

do add role permission

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

References ILIAS\Repository\logger().

Referenced by adjustRoleObject(), and removeRolePermissionsObject().

560  : void
561  {
562  $this->logger->debug('Remove permission source: ' . $source);
563  $this->logger->debug('Remove permission target: ' . $target);
564  $source_obj = $this->rbac_review->getRoleFolderOfRole($source);
565  $this->rbacadmin->copyRolePermissionSubtract(
566  $source,
567  $source_obj,
568  $target,
569  $this->rbac_review->getRoleFolderOfRole($target)
570  );
571  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettingsObject()

ilObjRoleFolderGUI::editSettingsObject ( ilPropertyFormGUI  $a_form = null)

Definition at line 750 of file class.ilObjRoleFolderGUI.php.

References initSettingsForm().

Referenced by saveSettingsObject().

750  : void
751  {
752  if ($a_form === null) {
753  $a_form = $this->initSettingsForm();
754  }
755 
756  $this->tpl->setContent($a_form->getHTML());
757  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjRoleFolderGUI::executeCommand ( )

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

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

65  : void
66  {
67  $next_class = $this->ctrl->getNextClass($this);
68  $cmd = $this->ctrl->getCmd();
69  $this->prepareOutput();
70 
71  switch ($next_class) {
72  case 'ilpermissiongui':
73  $perm_gui = new ilPermissionGUI($this);
74  $ret = $this->ctrl->forwardCommand($perm_gui);
75  break;
76 
77  default:
78  $this->ctrl->setReturn($this, "view");
79  if (!$cmd) {
80  $cmd = "view";
81  }
82  $cmd .= "Object";
83  $this->$cmd();
84 
85  break;
86  }
87  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRoleFolderGUI::getAdminTabs ( )

Add role folder tabs.

Parameters
ilTabsGUI$tabs_guiilLanguage $lng ilTree $tree

Definition at line 719 of file class.ilObjRoleFolderGUI.php.

References ilObjectGUI\checkPermissionBool(), and ILIAS\Repository\ctrl().

719  : void
720  {
721  if ($this->checkPermissionBool("visible,read")) {
722  $this->tabs_gui->addTarget(
723  "view",
724  $this->ctrl->getLinkTarget($this, "view"),
725  ["", "view"],
726  get_class($this)
727  );
728 
729  $this->tabs_gui->addTarget(
730  "settings",
731  $this->ctrl->getLinkTarget($this, "editSettings"),
732  ["editSettings"],
733  get_class($this)
734  );
735  }
736 
737  if ($this->checkPermissionBool("edit_permission")) {
738  $this->tabs_gui->addTarget(
739  "perm_settings",
740  $this->ctrl->getLinkTargetByClass(
741  [get_class($this), 'ilpermissiongui'],
742  "perm"
743  ),
744  "",
745  "ilpermissiongui"
746  );
747  }
748  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ initCopyBehaviourForm()

ilObjRoleFolderGUI::initCopyBehaviourForm ( )
protected

Show copy behaviour form.

Definition at line 326 of file class.ilObjRoleFolderGUI.php.

References ilObject\_lookupTitle(), buildTargetNamesString(), ILIAS\Repository\ctrl(), initCopySourceFromGET(), initRolesFromPOST(), and ILIAS\Repository\lng().

Referenced by adjustRoleObject(), chooseCopyBehaviourObject(), and removeRolePermissionsObject().

327  {
328  // not only for role templates; add/remove permissions is also applicable for roles
329  $full_featured = true;
330 
331  $this->tpl->setOnScreenMessage(
332  'info',
333  sprintf(
334  $this->lng->txt('rbac_copy_behaviour_info'),
335  '<strong>' . ilObject::_lookupTitle($this->initCopySourceFromGET()) . '</strong>',
336  $this->buildTargetNamesString()
337  ),
338  true
339  );
340 
341  $form = new ilPropertyFormGUI();
342  $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
343  $form->setFormAction($this->ctrl->getFormAction($this, 'chooseCopyBehaviour'));
344 
345  $copy_type = new \ilRadioGroupInputGUI(
346  $this->lng->txt('rbac_form_copy_roles_adjust_type'),
347  'type'
348  );
349  $copy_type->setRequired(true);
350  $copy_type->setValue((string) self::COPY_CLONE_PERMISSIONS);
351 
352  if ($full_featured) {
353  $add = new \ilRadioOption(
354  $this->lng->txt('rbac_form_copy_roles_adjust_type_add'),
355  (string) self::COPY_ADD_PERMISSIONS,
356  $this->lng->txt('rbac_form_copy_roles_adjust_type_add_info')
357  );
358  $copy_type->addOption($add);
359 
360  $ce_type_add = new \ilRadioGroupInputGUI(
361  '',
362  'add_ce_type'
363  );
364  $ce_type_add->setRequired(true);
365  $ce_add_yes = new \ilRadioOption(
366  $this->lng->txt('rbac_form_copy_roles_ce_add_yes'),
367  (string) self::COPY_CHANGE_EXISTING_OBJECTS,
368  $this->lng->txt('rbac_form_copy_roles_ce_add_yes_info')
369  );
370  $ce_type_add->addOption($ce_add_yes);
371  $ce_add_no = new \ilRadioOption(
372  $this->lng->txt('rbac_form_copy_roles_ce_add_no'),
373  (string) 0,
374  $this->lng->txt('rbac_form_copy_roles_ce_add_no_info')
375  );
376  $ce_type_add->addOption($ce_add_no);
377  $add->addSubItem($ce_type_add);
378  }
379  $clone = new \ilRadioOption(
380  $this->lng->txt('rbac_form_copy_roles_adjust_type_clone'),
381  (string) self::COPY_CLONE_PERMISSIONS,
382  $this->lng->txt('rbac_form_copy_roles_adjust_type_clone_info')
383  );
384  $copy_type->addOption($clone);
385 
386  $ce_type_clone = new \ilRadioGroupInputGUI(
387  '',
388  'clone_ce_type'
389  );
390  $ce_type_clone->setRequired(true);
391  $ce_clone_yes = new \ilRadioOption(
392  $this->lng->txt('rbac_form_copy_roles_ce_clone_yes'),
393  (string) self::COPY_CHANGE_EXISTING_OBJECTS,
394  $this->lng->txt('rbac_form_copy_roles_ce_clone_yes_info')
395  );
396  $ce_type_clone->addOption($ce_clone_yes);
397  $ce_clone_no = new \ilRadioOption(
398  $this->lng->txt('rbac_form_copy_roles_ce_clone_no'),
399  (string) 0,
400  $this->lng->txt('rbac_form_copy_roles_ce_clone_no_info')
401  );
402  $ce_type_clone->addOption($ce_clone_no);
403  $clone->addSubItem($ce_type_clone);
404 
405  if ($full_featured) {
406  $remove = new \ilRadioOption(
407  $this->lng->txt('rbac_form_copy_roles_adjust_type_remove'),
408  (string) self::COPY_REMOVE_PERMISSIONS,
409  $this->lng->txt('rbac_form_copy_roles_adjust_type_remove_info')
410  );
411  $copy_type->addOption($remove);
412  $ce_type_remove = new \ilRadioGroupInputGUI(
413  '',
414  'remove_ce_type'
415  );
416  $ce_type_remove->setRequired(true);
417  $ce_remove_yes = new \ilRadioOption(
418  $this->lng->txt('rbac_form_copy_roles_ce_remove_yes'),
419  (string) self::COPY_CHANGE_EXISTING_OBJECTS,
420  $this->lng->txt('rbac_form_copy_roles_ce_remove_yes_info')
421  );
422  $ce_type_remove->addOption($ce_remove_yes);
423  $ce_remove_no = new \ilRadioOption(
424  $this->lng->txt('rbac_form_copy_roles_ce_remove_no'),
425  (string) 0,
426  $this->lng->txt('rbac_form_copy_roles_ce_remove_no_info')
427  );
428  $ce_type_remove->addOption($ce_remove_no);
429  $remove->addSubItem($ce_type_remove);
430  }
431 
432  $form->addItem($copy_type);
433 
434  $roles = new ilHiddenInputGUI('roles');
435  $roles->setValue(implode(',', $this->initRolesFromPOST()));
436  $form->addItem($roles);
437 
438  $form->addCommandButton('roleSearchList', $this->lng->txt('back'));
439  $form->addCommandButton('adjustRole', $this->lng->txt('rbac_form_copy_roles_adjust_button'));
440  return $form;
441  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCopySourceFromGET()

ilObjRoleFolderGUI::initCopySourceFromGET ( )
protected

Definition at line 89 of file class.ilObjRoleFolderGUI.php.

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

Referenced by adjustRoleObject(), chooseCopyBehaviourObject(), initCopyBehaviourForm(), removeRolePermissionsObject(), roleSearchFormObject(), roleSearchListObject(), and roleSearchObject().

89  : int
90  {
91  if ($this->http->wrapper()->query()->has('csource')) {
92  return $this->http->wrapper()->query()->retrieve(
93  'csource',
94  $this->refinery->kindlyTo()->int()
95  );
96  }
97  return 0;
98  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRoleSearchForm()

ilObjRoleFolderGUI::initRoleSearchForm ( )
protected

Init role search form.

Definition at line 234 of file class.ilObjRoleFolderGUI.php.

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

Referenced by roleSearchFormObject(), and roleSearchObject().

235  {
236  $form = new ilPropertyFormGUI();
237  $form->setTitle($this->lng->txt('rbac_role_title'));
238  $form->setFormAction($this->ctrl->getFormAction($this, 'view'));
239 
240  $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
241  $search->setRequired(true);
242  $search->setSize(30);
243  $search->setMaxLength(255);
244  $form->addItem($search);
245 
246  $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
247  return $form;
248  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRolesFromPOST()

ilObjRoleFolderGUI::initRolesFromPOST ( )
protected
Returns
array<int>

Definition at line 103 of file class.ilObjRoleFolderGUI.php.

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

Referenced by adjustRoleObject(), buildTargetNamesString(), confirmDeleteObject(), deleteRoleObject(), initCopyBehaviourForm(), and removeRolePermissionsObject().

103  : array
104  {
105  if ($this->http->wrapper()->post()->has('roles')) {
106  return $this->http->wrapper()->post()->retrieve(
107  'roles',
108  $this->refinery->byTrying([
109  $this->refinery->kindlyTo()->listOf(
110  $this->refinery->kindlyTo()->int()
111  ),
112  $this->refinery->in()->series([
113  $this->refinery->custom()->transformation(function ($v) {
114  return explode(',', $v);
115  }),
116  $this->refinery->kindlyTo()->listOf(
117  $this->refinery->kindlyTo()->int()
118  )
119  ])
120  ])
121  );
122  }
123  return [];
124  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRoleFolderGUI::initSettingsForm ( )
protected

Definition at line 789 of file class.ilObjRoleFolderGUI.php.

References $check, $DIC, $GLOBALS, ilObjectGUI\$user, ilSecuritySettings\_getInstance(), ILIAS\Repository\ctrl(), ilObject\getId(), ilPrivacySettings\getInstance(), ILIAS\Repository\lng(), and SYSTEM_ROLE_ID.

Referenced by editSettingsObject(), and saveSettingsObject().

790  {
791  global $DIC;
792 
793  $user = $DIC->user();
794 
795  $this->lng->loadLanguageModule('ps');
796 
797  $privacy = ilPrivacySettings::getInstance();
798  $security = ilSecuritySettings::_getInstance();
799 
800  $form = new ilPropertyFormGUI();
801  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
802  $form->setTitle($this->lng->txt('settings'));
803 
804  // protected admin
805  $admin = new ilCheckboxInputGUI($GLOBALS['DIC']['lng']->txt('adm_adm_role_protect'), 'admin_role');
806  $admin->setDisabled(!$this->rbac_review->isAssigned($user->getId(), SYSTEM_ROLE_ID));
807  $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
808  $admin->setChecked($security->isAdminRoleProtected());
809  $admin->setValue((string) 1);
810  $form->addItem($admin);
811 
812  $check = new ilCheckboxInputGUI($this->lng->txt('rbac_log'), 'rbac_log');
813  $check->setInfo($this->lng->txt('rbac_log_info'));
814  $check->setChecked($privacy->enabledRbacLog());
815  $form->addItem($check);
816 
817  $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
818  $age->setInfo($this->lng->txt('rbac_log_age_info'));
819  $age->setValue((string) $privacy->getRbacLogAge());
820  $age->setMinValue(1);
821  $age->setMaxValue(24);
822  $age->setSize(2);
823  $age->setMaxLength(2);
824  $check->addSubItem($age);
825 
826  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
827 
828  return $form;
829  }
const SYSTEM_ROLE_ID
Definition: constants.php:29
$GLOBALS["DIC"]
Definition: wac.php:30
global $DIC
Definition: shib_login.php:25
$check
Definition: buildRTE.php:81
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeRolePermissionsObject()

ilObjRoleFolderGUI::removeRolePermissionsObject ( )
protected

Remove role permissions.

Definition at line 539 of file class.ilObjRoleFolderGUI.php.

References ILIAS\Repository\ctrl(), doRemoveRolePermissions(), initCopyBehaviourForm(), initCopySourceFromGET(), initRolesFromPOST(), and ILIAS\Repository\lng().

539  : void
540  {
541  // Finally copy role/rolt
542  $roles = $this->initRolesFromPOST();
543  $source = $this->initCopySourceFromGET();
544 
545  $form = $this->initCopyBehaviourForm();
546  if ($form->checkInput()) {
547  foreach ((array) $roles as $role_id) {
548  if ($role_id !== $source) {
549  $this->doRemoveRolePermissions($source, $role_id);
550  }
551  }
552  $this->tpl->setOnScreenMessage('success', $this->lng->txt('rbac_copy_finished'), true);
553  $this->ctrl->redirect($this, 'view');
554  }
555  }
doRemoveRolePermissions(int $source, int $target)
do add role permission
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjRoleFolderGUI::resetFilterObject ( )

Reset role filter.

Definition at line 644 of file class.ilObjRoleFolderGUI.php.

References viewObject().

644  : void
645  {
646  $table = new ilRoleTableGUI($this, 'view');
647  $table->init();
648  $table->resetOffset();
649  $table->resetFilter();
650 
651  $this->viewObject();
652  }
TableGUI for the presentation og roles and role templates.
+ Here is the call graph for this function:

◆ returnObject()

ilObjRoleFolderGUI::returnObject ( )

Definition at line 126 of file class.ilObjRoleFolderGUI.php.

References viewObject().

126  : void
127  {
128  $this->viewObject();
129  }
+ Here is the call graph for this function:

◆ roleSearchFormObject()

ilObjRoleFolderGUI::roleSearchFormObject ( )
protected

Parse search query.

Definition at line 253 of file class.ilObjRoleFolderGUI.php.

References ILIAS\Repository\ctrl(), initCopySourceFromGET(), initRoleSearchForm(), ILIAS\Repository\lng(), roleSearchListObject(), and ilSession\set().

253  : void
254  {
255  ilSession::set('rolf_search_query', '');
256  $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
257 
258  $form = $this->initRoleSearchForm();
259  if ($form->checkInput()) {
260  ilSession::set('rolf_search_query', $form->getInput('title'));
261  $this->roleSearchListObject();
262  return;
263  }
264 
265  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_search_string'), true);
266  $form->setValuesByPost();
267  $this->ctrl->redirect($this, 'roleSearch');
268  }
initRoleSearchForm()
Init role search form.
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ roleSearchListObject()

ilObjRoleFolderGUI::roleSearchListObject ( )
protected

List roles.

Definition at line 273 of file class.ilObjRoleFolderGUI.php.

References ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), ilSession\get(), initCopySourceFromGET(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilRoleTableGUI\TYPE_SEARCH.

Referenced by roleSearchFormObject().

273  : void
274  {
275  $this->tabs_gui->clearTargets();
276  $this->tabs_gui->setBackTarget(
277  $this->lng->txt('rbac_back_to_overview'),
278  $this->ctrl->getLinkTarget($this, 'view')
279  );
280 
281  $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
282 
283  if (strlen(ilSession::get('rolf_search_query'))) {
284  $this->tpl->setOnScreenMessage(
285  'info',
286  sprintf(
287  $this->lng->txt('rbac_select_copy_targets'),
288  '<strong>' . ilObject::_lookupTitle($this->initCopySourceFromGET()) . '</strong>'
289  )
290  );
291  $table = new ilRoleTableGUI($this, 'roleSearchList');
292  $table->setType(ilRoleTableGUI::TYPE_SEARCH);
293  $table->setRoleTitleFilter(ilSession::get('rolf_search_query'));
294  $table->init();
295  $table->parse($this->object->getId());
296  $this->tpl->setContent($table->getHTML());
297  return;
298  }
299 
300  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_search_string'), true);
301  $this->ctrl->redirect($this, 'roleSearch');
302  }
static get(string $a_var)
TableGUI for the presentation og roles and role templates.
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ roleSearchObject()

ilObjRoleFolderGUI::roleSearchObject ( )
protected

Search target roles.

Definition at line 206 of file class.ilObjRoleFolderGUI.php.

References ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), initCopySourceFromGET(), initRoleSearchForm(), and ILIAS\Repository\lng().

206  : void
207  {
208  $this->tabs_gui->clearTargets();
209  $this->tabs_gui->setBackTarget(
210  $this->lng->txt('rbac_back_to_overview'),
211  $this->ctrl->getLinkTarget($this, 'view')
212  );
213 
214  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
215  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
216  }
217 
218  $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
219  $this->tpl->setOnScreenMessage(
220  'info',
221  sprintf(
222  $this->lng->txt('rbac_choose_copy_targets'),
223  '<strong>' . ilObject::_lookupTitle($this->initCopySourceFromGET()) . '</strong>'
224  )
225  );
226 
227  $form = $this->initRoleSearchForm();
228  $this->tpl->setContent($form->getHTML());
229  }
static _lookupTitle(int $obj_id)
initRoleSearchForm()
Init role search form.
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjRoleFolderGUI::saveSettingsObject ( )

Definition at line 759 of file class.ilObjRoleFolderGUI.php.

References $DIC, ilObjectGUI\$user, ilSecuritySettings\_getInstance(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), editSettingsObject(), ilObject\getId(), ilPrivacySettings\getInstance(), initSettingsForm(), ILIAS\Repository\lng(), and SYSTEM_ROLE_ID.

759  : void
760  {
761  global $DIC;
762 
763  $user = $DIC->user();
764 
765  if (!$this->checkPermissionBool("write")) {
766  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
767  }
768 
769  $form = $this->initSettingsForm();
770  if ($form->checkInput()) {
771  $privacy = ilPrivacySettings::getInstance();
772  $privacy->enableRbacLog((bool) $form->getInput('rbac_log'));
773  $privacy->setRbacLogAge((int) $form->getInput('rbac_log_age'));
774  $privacy->save();
775 
776  if ($this->rbac_review->isAssigned($user->getId(), SYSTEM_ROLE_ID)) {
777  $security = ilSecuritySettings::_getInstance();
778  $security->protectedAdminRole((bool) $form->getInput('admin_role'));
779  $security->save();
780  }
781  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
782  $this->ctrl->redirect($this, "editSettings");
783  }
784 
785  $form->setValuesByPost();
786  $this->editSettingsObject($form);
787  }
editSettingsObject(ilPropertyFormGUI $a_form=null)
const SYSTEM_ROLE_ID
Definition: constants.php:29
global $DIC
Definition: shib_login.php:25
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ viewObject()

ilObjRoleFolderGUI::viewObject ( )

Definition at line 156 of file class.ilObjRoleFolderGUI.php.

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

Referenced by applyFilterObject(), resetFilterObject(), and returnObject().

156  : void
157  {
158  $this->tabs_gui->activateTab('view');
159 
160  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
161  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
162  }
163 
164  if ($this->rbac_system->checkAccess('create_role', $this->object->getRefId())) {
165  $this->ctrl->setParameter($this, 'new_type', 'role');
166  $this->toolbar->addComponent(
167  $this->ui_factory->link()->standard(
168  $this->lng->txt('rolf_create_role'),
169  $this->ctrl->getLinkTargetByClass(ilObjRoleGUI::class, 'create')
170  )
171  );
172  }
173  if ($this->rbac_system->checkAccess('create_rolt', $this->object->getRefId())) {
174  $this->ctrl->setParameter($this, 'new_type', 'rolt');
175  $this->toolbar->addComponent(
176  $this->ui_factory->link()->standard(
177  $this->lng->txt('rolf_create_rolt'),
178  $this->ctrl->getLinkTargetByClass(ilObjRoleTemplateGUI::class, 'create')
179  )
180  );
181  $this->ctrl->clearParameters($this);
182  }
183 
184  if (
185  $this->rbac_system->checkAccess('create_rolt', $this->object->getRefId()) ||
186  $this->rbac_system->checkAccess('create_rolt', $this->object->getRefId())
187  ) {
188  $this->toolbar->addComponent(
189  $this->ui_factory->link()->standard(
190  $this->lng->txt('rbac_import_role'),
191  $this->ctrl->getLinkTargetByClass('ilPermissionGUI', 'displayImportRoleForm')
192  )
193  );
194  }
195 
196  $table = new ilRoleTableGUI($this, 'view');
197  $table->init();
198  $table->parse($this->object->getId());
199 
200  $this->tpl->setContent($table->getHTML());
201  }
TableGUI for the presentation og roles and role templates.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

GlobalHttpState ilObjRoleFolderGUI::$http
protected

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

◆ $logger

ilLogger ilObjRoleFolderGUI::$logger
private

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

◆ $rbacadmin

ilRbacAdmin ilObjRoleFolderGUI::$rbacadmin
protected

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

◆ $refinery

Factory ilObjRoleFolderGUI::$refinery
protected

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

◆ $ui_factory

UIFactory ilObjRoleFolderGUI::$ui_factory
protected

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

◆ COPY_ADD_PERMISSIONS

const ilObjRoleFolderGUI::COPY_ADD_PERMISSIONS = 1
private

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

◆ COPY_CHANGE_EXISTING_OBJECTS

const ilObjRoleFolderGUI::COPY_CHANGE_EXISTING_OBJECTS = 1
private

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

◆ COPY_CLONE_PERMISSIONS

const ilObjRoleFolderGUI::COPY_CLONE_PERMISSIONS = 2
private

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

◆ COPY_REMOVE_PERMISSIONS

const ilObjRoleFolderGUI::COPY_REMOVE_PERMISSIONS = 3
private

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


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