ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjDataProtectionGUI Class Reference

ilObjDataProtectionGUI: ilAdministrationGUI ilObjDataProtectionGUI: ilLegalDocumentsAdministrationGUI ilObjDataProtectionGUI: ilPermissionGUI More...

+ Inheritance diagram for ilObjDataProtectionGUI:
+ Collaboration diagram for ilObjDataProtectionGUI:

Public Member Functions

 __construct ()
 
 getType ()
 
 executeCommand ()
 
 view ()
 
 settings ()
 
 confirmReset ()
 
 resetNow ()
 
 getAdminTabs ()
 
 afterDocumentDeletion ()
 
- 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)
 
 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)
 

Private Member Functions

 requireReadable ()
 
 form ()
 
 optionalGroup (string $label, string $description, array $fields)
 
 radio (string $prefix, array $options)
 
 createDataProtectionSettings ()
 
 documents ()
 

Private Attributes

readonly ilLegalDocumentsAdministrationGUI $legal_documents
 
readonly Container $container
 
readonly Config $config
 
readonly Settings $data_protection_settings
 
readonly UI $ui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Protected Member Functions 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="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 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 ()
 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 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
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
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
 
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 = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjDataProtectionGUI::__construct ( )

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

References $config, $DIC, ILIAS\GlobalScreen\Provider\__construct(), afterDocumentDeletion(), createDataProtectionSettings(), getType(), and ILIAS\Repository\ui().

50  {
51  parent::__construct(...func_get_args());
52  global $DIC;
53  $this->container = $DIC;
54  $config = new Config($DIC['legalDocuments']->provide(Consumer::ID));
55  if ($this->rbac_system->checkAccess('write', $this->object->getRefId())) {
57  }
58  $this->config = $config;
59  $this->legal_documents = new ilLegalDocumentsAdministrationGUI(self::class, $config, $this->afterDocumentDeletion(...));
60 
61  $this->data_protection_settings = $this->createDataProtectionSettings();
62  $this->ui = new UI($this->getType(), $this->container->ui(), $this->container->language());
63  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ afterDocumentDeletion()

ilObjDataProtectionGUI::afterDocumentDeletion ( )

Definition at line 162 of file class.ilObjDataProtectionGUI.php.

Referenced by __construct().

162  : void
163  {
164  if ($this->config->legalDocuments()->document()->repository()->countAll() === 0) {
165  $this->data_protection_settings->enabled()->update(false);
166  }
167  }
+ Here is the caller graph for this function:

◆ confirmReset()

ilObjDataProtectionGUI::confirmReset ( )

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

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

131  : void
132  {
133  $this->container->tabs()->activateTab('documents');
134  $this->legal_documents->admin()->requireEditable();
135  $this->legal_documents->admin()->setContent((new Confirmation($this->lng))->render(
136  $this->ctrl->getFormAction($this, 'resetNow'),
137  'resetNow',
138  'documents',
139  $this->ui->txt('sure_reset_tos')
140  ));
141  }
+ Here is the call graph for this function:

◆ createDataProtectionSettings()

ilObjDataProtectionGUI::createDataProtectionSettings ( )
private

Definition at line 256 of file class.ilObjDataProtectionGUI.php.

Referenced by __construct().

256  : Settings
257  {
258  $store = new ILIASSettingStore($this->container->settings());
259  return new Settings(new SelectSetting(
260  $this->config->editable() ? $store : new ReadOnlyStore($store),
261  new Marshal($this->container->refinery())
262  ));
263  }
+ Here is the caller graph for this function:

◆ documents()

ilObjDataProtectionGUI::documents ( )
private

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

References ILIAS\Repository\ctrl().

Referenced by executeCommand().

265  : void
266  {
267  $buttons = $this->config->editable() ?
268  [$this->legal_documents->admin()->resetButton($this->ctrl->getLinkTarget($this, 'confirmReset'))] :
269  [];
270 
271  $reset_date = $this->data_protection_settings->lastResetDate()->value();
272  $this->tpl->setCurrentBlock('mess');
273  $this->legal_documents->admin()->setVariable('MESSAGE', $this->legal_documents->admin()->resetBox($reset_date, $buttons));
274  $this->tpl->parseCurrentBlock('mess');
275  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjDataProtectionGUI::executeCommand ( )

Definition at line 70 of file class.ilObjDataProtectionGUI.php.

References ILIAS\Repository\ctrl(), documents(), ilObject2GUI\prepareOutput(), and requireReadable().

70  : void
71  {
72  $this->requireReadable();
73  $this->prepareOutput();
74 
75  $this->container->language()->loadLanguageModule('dpro');
76  $this->container->language()->loadLanguageModule('ldoc');
77 
78  $next_class = $this->ctrl->getNextClass($this) ?? '';
79  $cmd = $this->ctrl->getCmd('settings');
80 
81  switch (strtolower($next_class)) {
82  case strtolower(ilLegalDocumentsAdministrationGUI::class):
83  if ($cmd === 'documents') {
84  $this->documents();
85  }
86  $this->ctrl->forwardCommand($this->legal_documents);
87  return;
88  case strtolower(ilPermissionGUI::class):
89  $this->tabs_gui->activateTab('permissions');
90  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
91  return;
92  default:
93  switch ($cmd) {
94  case 'documents':
95  $this->ctrl->redirectByClass(ilLegalDocumentsAdministrationGUI::class, 'documents');
96  break;
97 
98  default:
99  $reflection = new ReflectionClass(self::class);
100  if (!$reflection->hasMethod($cmd) || !$reflection->getMethod($cmd)->isPublic()) {
101  throw new Exception('Undefined command.');
102  }
103  $this->$cmd();
104  }
105  }
106  }
if(!file_exists('../ilias.ini.php'))
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ form()

ilObjDataProtectionGUI::form ( )
private

Definition at line 176 of file class.ilObjDataProtectionGUI.php.

References ilObjectGUI\$data, ilObject2GUI\$type, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), null, optionalGroup(), radio(), ILIAS\Repository\ui(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by settings().

176  : Component
177  {
178  $no_documents = $this->config->legalDocuments()->document()->repository()->countAll() === 0;
179  if ($no_documents) {
180  $this->tpl->setOnScreenMessage('info', $this->ui->txt('no_documents_exist'), true);
181  }
182 
183  $enabled = $this->optionalGroup('status_enable', 'status_enable_desc', [
184  'type' => $this->radio('mode', [
185  'once' => 'once',
186  'eval_on_login' => 'reevaluate_on_login',
187  'no_acceptance' => 'no_acceptance',
188  ])->withValue(
189  $this->data_protection_settings->validateOnLogin()->value() ?
190  'eval_on_login' :
191  ($this->data_protection_settings->noAcceptance()->value() ? 'no_acceptance' : 'once')
192  )->withRequired(true),
193  ]);
194 
195  $enabled = $enabled->withValue($this->data_protection_settings->enabled()->value() ? [
196  'type' => $this->data_protection_settings->validateOnLogin()->value() ?
197  'eval_on_login' :
198  ($this->data_protection_settings->noAcceptance()->value() ? 'no_acceptance' : 'once'),
199  ] : null);
200 
201  $enabled = $enabled->withDisabled(!$this->config->editable())->withRequired(true);
202 
203  $form = $this->ui->create()->input()->container()->form()->standard(
204  $this->ctrl->getFormAction($this, 'settings'),
205  ['enabled' => $enabled]
206  );
207 
208  if (!$this->config->editable()) {
209  $form = $form->withSubmitLabel($this->lng->txt('refresh'));
210  return $this->legal_documents->admin()->withFormData($form, function () {
211  $this->ctrl->redirect($this, 'settings');
212  });
213  }
214 
215  return $this->legal_documents->admin()->withFormData($form, function (array $data) use ($no_documents): void {
216  if ($no_documents && isset($data['enabled'])) {
217  $this->tpl->setOnScreenMessage('failure', $this->ui->txt('no_documents_exist_cant_save'), true);
218  $this->ctrl->redirect($this, 'settings');
219  }
220  $type = $data['enabled']['type'] ?? false;
221  $this->data_protection_settings->enabled()->update(isset($data['enabled']));
222  if (isset($data['enabled'])) {
223  $this->data_protection_settings->validateOnLogin()->update($type === 'eval_on_login');
224  $this->data_protection_settings->noAcceptance()->update($type === 'no_acceptance');
225  }
226 
227  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
228  $this->ctrl->redirect($this, 'settings');
229  });
230  }
radio(string $prefix, array $options)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
optionalGroup(string $label, string $description, array $fields)
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjDataProtectionGUI::getAdminTabs ( )

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

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

153  : void
154  {
155  $this->container->language()->loadLanguageModule('tos');
156  $this->legal_documents->tabs([
157  'documents' => fn() => $this->tabs_gui->addTab('settings', $this->ui->txt('settings'), $this->ctrl->getLinkTarget($this, 'settings')),
158  ]);
159  $this->tabs_gui->addTab('permissions', $this->ui->txt('perm_settings'), $this->ctrl->getLinkTargetByClass([self::class, ilPermissionGUI::class], 'perm'));
160  }
+ Here is the call graph for this function:

◆ getType()

ilObjDataProtectionGUI::getType ( )

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

Referenced by __construct().

65  : string
66  {
67  return 'dpro';
68  }
+ Here is the caller graph for this function:

◆ optionalGroup()

ilObjDataProtectionGUI::optionalGroup ( string  $label,
string  $description,
array  $fields 
)
private
Parameters
array<string|int,Input>$fields

Definition at line 235 of file class.ilObjDataProtectionGUI.php.

References ILIAS\Repository\ui().

Referenced by form().

235  : OptionalGroup
236  {
237  return $this->ui->create()->input()->field()->optionalGroup(
238  $fields,
239  $this->ui->txt($label),
240  $this->ui->txt($description)
241  );
242  }
This describes optional group inputs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radio()

ilObjDataProtectionGUI::radio ( string  $prefix,
array  $options 
)
private
Parameters
array<string|int,string>$options

Definition at line 247 of file class.ilObjDataProtectionGUI.php.

References ILIAS\Repository\ui().

Referenced by form().

247  : Component
248  {
249  $field = $this->ui->create()->input()->field()->radio($this->ui->txt($prefix), $this->ui->txt($prefix . '_desc'));
250  foreach ($options as $key => $label) {
251  $field = $field->withOption((string) $key, $this->ui->txt($label));
252  }
253  return $field;
254  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requireReadable()

ilObjDataProtectionGUI::requireReadable ( )
private

Definition at line 169 of file class.ilObjDataProtectionGUI.php.

Referenced by executeCommand().

169  : void
170  {
171  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
172  $this->error->raiseError($this->container->language()->txt('msg_no_perm_read'), $this->error->WARNING);
173  }
174  }
+ Here is the caller graph for this function:

◆ resetNow()

ilObjDataProtectionGUI::resetNow ( )

Definition at line 143 of file class.ilObjDataProtectionGUI.php.

References ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), and SYSTEM_USER_ID.

143  : void
144  {
145  $this->legal_documents->admin()->requireEditable();
146 
147  $in = $this->container->database()->in('usr_id', [ANONYMOUS_USER_ID, SYSTEM_USER_ID], true, 'integer');
148  $this->container->database()->manipulate("delete from usr_pref WHERE keyword = 'dpro_agree_date' AND $in");
149  $this->data_protection_settings->lastResetDate()->update((new DataFactory())->clock()->system()->now());
150  $this->ctrl->redirect($this->legal_documents, 'documents');
151  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ settings()

ilObjDataProtectionGUI::settings ( )

Definition at line 113 of file class.ilObjDataProtectionGUI.php.

References $components, form(), and ILIAS\Repository\ui().

Referenced by view().

113  : void
114  {
115  $this->container->tabs()->activateTab('settings');
116 
117  $components = [];
118 
119  if ($this->data_protection_settings->enabled()->value() && $this->config->legalDocuments()->document()->repository()->countAll() === 0) {
120  $components[] = $this->ui->create()->messageBox()->info(
121  $this->ui->txt('no_documents_exist')
122  );
123  }
124 
125  $components[] = $this->legal_documents->admin()->externalSettingsMessage($this->data_protection_settings->deleteUserOnWithdrawal()->value());
126 
127  $components[] = $this->form();
128  $this->tpl->setContent($this->container->ui()->renderer()->render($components));
129  }
$components
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjDataProtectionGUI::view ( )

Definition at line 108 of file class.ilObjDataProtectionGUI.php.

References settings().

108  : void
109  {
110  $this->settings();
111  }
+ Here is the call graph for this function:

Field Documentation

◆ $config

readonly Config ilObjDataProtectionGUI::$config
private

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

Referenced by __construct().

◆ $container

readonly Container ilObjDataProtectionGUI::$container
private

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

◆ $data_protection_settings

readonly Settings ilObjDataProtectionGUI::$data_protection_settings
private

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

◆ $legal_documents

readonly ilLegalDocumentsAdministrationGUI ilObjDataProtectionGUI::$legal_documents
private

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

◆ $ui

readonly UI ilObjDataProtectionGUI::$ui
private

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


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