ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\User\Settings\StartingPoint\SettingsGUI Class Reference
+ Collaboration diagram for ILIAS\User\Settings\StartingPoint\SettingsGUI:

Public Member Functions

 executeCommand ()
 
 startingPoints ()
 table form to set up starting points depends of user roles More...
 
 initUserStartingPointForm (?\ilPropertyFormGUI $form=null)
 
 initRoleStartingPointForm (?\ilPropertyFormGUI $form=null)
 
 addRoleAutoCompleteObject ()
 
 saveOrder ()
 

Protected Member Functions

 getRoleStartingPointForm ()
 
 saveStartingPoint ()
 store starting point from the form More...
 
 deleteStartingPoint ()
 

Private Member Functions

 getCurrentStartingPointOrNullForStartingPointForm (?int $starting_point_id)
 
 getCurrentTypeForStartingPointForm (?StartingPoint $starting_point)
 
 getFormTypeSpecificStartingPointFormParts (?int $spoint_id, ?int $req_role_id)
 
 getCreateFormSpecificInputs ()
 
 getEditFormSpecificInputs (int $spoint_id, int $req_role_id)
 
 getStartingPointSelectionInput (?StartingPoint $st_point)
 
 getStartingPointSelectionOption (int $value, string $caption, ?StartingPoint $st_point, array $valid)
 
 getCalenderSubInputs (?StartingPoint $st_point)
 
 getRepositoryObjectInput (?StartingPoint $st_point)
 
 showRoleSelection (string $role, string $role_search, string $start_point, string $start_object)
 

Private Attributes

ilLogger $log
 
Language $lng
 
ilSetting $settings
 
ilGlobalTemplateInterface $tpl
 
ilToolbarGUI $toolbar
 
ilTabsGUI $tabs
 
ilCtrl $ctrl
 
ilTree $tree
 
ilObjUser $user
 
ilDBInterface $db
 
ilRbacReview $rbac_review
 
ilRbacSystem $rbac_system
 
UIFactory $ui_factory
 
Renderer $ui_renderer
 
UserGUIRequest $user_request
 
Repository $starting_point_repository
 
int $parent_ref_id
 

Detailed Description

Definition at line 29 of file class.SettingsGUI.php.

Member Function Documentation

◆ addRoleAutoCompleteObject()

ILIAS\User\Settings\StartingPoint\SettingsGUI::addRoleAutoCompleteObject ( )

Definition at line 346 of file class.SettingsGUI.php.

346 : void
347 {
349 }
static echoAutoCompleteList()
Static asynchronous default auto complete function.

References ilRoleAutoCompleteInputGUI\echoAutoCompleteList().

+ Here is the call graph for this function:

◆ deleteStartingPoint()

ILIAS\User\Settings\StartingPoint\SettingsGUI::deleteStartingPoint ( )
protected

Definition at line 504 of file class.SettingsGUI.php.

504 : void
505 {
506 if (!$this->rbac_system->checkAccess('write', $this->parent_ref_id)) {
507 throw new \ilPermissionException($this->lng->txt('msg_no_perm_read'));
508 }
509
510 $spoint_id = $this->user_request->getStartingPointId();
511 $req_role_id = $this->user_request->getRoleId();
512
513 if ($req_role_id && is_numeric($spoint_id)) {
514 $sp = $this->starting_point_repository->getStartingPointById(
515 $spoint_id
516 );
517 $this->starting_point_repository->delete($sp->getId());
518 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
519 } else {
520 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_spoint_not_modified'), true);
521 }
522 $this->ctrl->redirect($this, 'startingPoints');
523 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ILIAS\User\Settings\StartingPoint\SettingsGUI::executeCommand ( )

Definition at line 83 of file class.SettingsGUI.php.

83 : void
84 {
85 $cmd = $this->ctrl->getCmd();
86 if ($cmd == 'roleStartingPointform' || !$cmd) {
87 $cmd = 'initRoleStartingPointForm';
88 }
89
90 $this->$cmd();
91 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getCalenderSubInputs()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getCalenderSubInputs ( ?StartingPoint  $st_point)
private

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

291 {
292 $default_cal_view = new \ilRadioGroupInputGUI($this->lng->txt('cal_def_view'), 'user_calendar_view');
293 $default_cal_view->setRequired(true);
294
295 $day = new \ilRadioOption($this->lng->txt('day'), (string) \ilCalendarSettings::DEFAULT_CAL_DAY);
296 $default_cal_view->addOption($day);
297 $week = new \ilRadioOption($this->lng->txt('week'), (string) \ilCalendarSettings::DEFAULT_CAL_WEEK);
298 $default_cal_view->addOption($week);
299 $month = new \ilRadioOption($this->lng->txt('month'), (string) \ilCalendarSettings::DEFAULT_CAL_MONTH);
300 $default_cal_view->addOption($month);
301
302 $list = new \ilRadioOption($this->lng->txt('cal_list'), (string) \ilCalendarSettings::DEFAULT_CAL_LIST);
303
304 $cal_periods = new \ilSelectInputGUI($this->lng->txt('cal_list'), 'user_cal_period');
305 $cal_periods->setOptions([
306 \ilCalendarAgendaListGUI::PERIOD_DAY => '1 ' . $this->lng->txt('day'),
307 \ilCalendarAgendaListGUI::PERIOD_WEEK => '1 ' . $this->lng->txt('week'),
308 \ilCalendarAgendaListGUI::PERIOD_MONTH => '1 ' . $this->lng->txt('month'),
309 \ilCalendarAgendaListGUI::PERIOD_HALF_YEAR => '6 ' . $this->lng->txt('months')
310 ]);
311 $cal_periods->setRequired(true);
312
313 if ($st_point !== null) {
314 $default_cal_view->setValue((string) $st_point->getCalendarView());
315 $cal_periods->setValue((string) $st_point->getCalendarPeriod());
316 }
317
318 $list->addSubItem($cal_periods);
319 $default_cal_view->addOption($list);
320
321 return $default_cal_view;
322 }
This class represents a property in a property form.

References ilCalendarSettings\DEFAULT_CAL_DAY, ilCalendarSettings\DEFAULT_CAL_LIST, ilCalendarSettings\DEFAULT_CAL_MONTH, ilCalendarSettings\DEFAULT_CAL_WEEK, ILIAS\User\Settings\StartingPoint\StartingPoint\getCalendarPeriod(), ILIAS\User\Settings\StartingPoint\StartingPoint\getCalendarView(), ILIAS\Repository\lng(), ilCalendarAgendaListGUI\PERIOD_DAY, ilCalendarAgendaListGUI\PERIOD_HALF_YEAR, ilCalendarAgendaListGUI\PERIOD_MONTH, and ilCalendarAgendaListGUI\PERIOD_WEEK.

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getStartingPointSelectionOption().

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

◆ getCreateFormSpecificInputs()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getCreateFormSpecificInputs ( )
private

Definition at line 197 of file class.SettingsGUI.php.

198 {
199 $roles = $this->starting_point_repository->getGlobalRolesWithoutStartingPoint();
200
201
202 // role type
203 $radg = new \ilRadioGroupInputGUI($this->lng->txt('role'), 'role_type');
204 $radg->setValue('1');
205 if ($roles !== []) {
206 $radg->setValue('0');
207 $op1 = new \ilRadioOption($this->lng->txt('user_global_role'), '0');
208 $radg->addOption($op1);
209
210 $role_options = [];
211 foreach ($roles as $role) {
212 $role_options[$role['id']] = $role['title'];
213 }
214 $si_roles = new \ilSelectInputGUI($this->lng->txt('roles_without_starting_point'), 'role');
215 $si_roles->setOptions($role_options);
216 $op1->addSubItem($si_roles);
217 }
218
219 $op2 = new \ilRadioOption($this->lng->txt('user_local_role'), '1');
220 $radg->addOption($op2);
221 $role_search = new \ilRoleAutoCompleteInputGUI('', 'role_search', $this, 'addRoleAutoCompleteObject');
222 $role_search->setSize(40);
223 $op2->addSubItem($role_search);
224 return $radg;
225 }

References ILIAS\Repository\lng().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getFormTypeSpecificStartingPointFormParts().

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

◆ getCurrentStartingPointOrNullForStartingPointForm()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getCurrentStartingPointOrNullForStartingPointForm ( ?int  $starting_point_id)
private

Definition at line 168 of file class.SettingsGUI.php.

168 : ?StartingPoint
169 {
170 if ($starting_point_id === null) {
171 return null;
172 }
173
174 return $this->starting_point_repository->getStartingPointById(
175 $starting_point_id
176 );
177 }

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getRoleStartingPointForm().

+ Here is the caller graph for this function:

◆ getCurrentTypeForStartingPointForm()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getCurrentTypeForStartingPointForm ( ?StartingPoint  $starting_point)
private

Definition at line 179 of file class.SettingsGUI.php.

179 : ?int
180 {
181 if ($starting_point === null) {
182 return null;
183 }
184
185 return $starting_point->getStartingPointType();
186 }

References ILIAS\User\Settings\StartingPoint\StartingPoint\getStartingPointType().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getRoleStartingPointForm().

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

◆ getEditFormSpecificInputs()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getEditFormSpecificInputs ( int  $spoint_id,
int  $req_role_id 
)
private

Definition at line 227 of file class.SettingsGUI.php.

227 : array
228 {
229 $title = $this->lng->txt('default');
230 if ($spoint_id !== $this->starting_point_repository->getDefaultStartingPointID()) {
231 $role = new \ilObjRole($req_role_id);
232 $title = $role->getTitle();
233 }
234
235 $inputs = [];
236 $inputs[0] = new \ilNonEditableValueGUI($this->lng->txt('editing_this_role'), 'role_disabled');
237 $inputs[0]->setValue($title);
238
239 $inputs[1] = new \ilHiddenInputGUI('role');
240 $inputs[1]->setValue((string) $req_role_id);
241
242 $inputs[2] = new \ilHiddenInputGUI('start_point_id');
243 $inputs[2]->setValue((string) $spoint_id);
244
245 return $inputs;
246 }

References ILIAS\UI\Implementation\Component\Input\$inputs, and ILIAS\Repository\lng().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getFormTypeSpecificStartingPointFormParts().

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

◆ getFormTypeSpecificStartingPointFormParts()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getFormTypeSpecificStartingPointFormParts ( ?int  $spoint_id,
?int  $req_role_id 
)
private

Definition at line 188 of file class.SettingsGUI.php.

188 : \Generator
189 { //edit no default
190 if ($spoint_id === null) {
191 yield $this->getCreateFormSpecificInputs();
192 } else {
193 yield from $this->getEditFormSpecificInputs($spoint_id, $req_role_id);
194 }
195 }
getEditFormSpecificInputs(int $spoint_id, int $req_role_id)

References ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getCreateFormSpecificInputs(), and ILIAS\User\Settings\StartingPoint\SettingsGUI\getEditFormSpecificInputs().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getRoleStartingPointForm().

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

◆ getRepositoryObjectInput()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getRepositoryObjectInput ( ?StartingPoint  $st_point)
private

Definition at line 324 of file class.SettingsGUI.php.

325 {
326 $repobj_id = new \ilTextInputGUI($this->lng->txt('adm_user_starting_point_ref_id'), 'start_object');
327 $repobj_id->setRequired(true);
328 $repobj_id->setSize(5);
329
330 if ($st_point !== null) {
331 $start_ref_id = $st_point->getStartingObject();
332 $repobj_id->setValue($start_ref_id);
333 }
334
335 if (isset($start_ref_id)) {
336 $start_obj_id = \ilObject::_lookupObjId($start_ref_id);
337 if ($start_obj_id) {
338 $repobj_id->setInfo($this->lng->txt('obj_' . \ilObject::_lookupType($start_obj_id)) .
339 ': ' . \ilObject::_lookupTitle($start_obj_id));
340 }
341 }
342
343 return $repobj_id;
344 }
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This class represents a text property in a property form.

References ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\User\Settings\StartingPoint\StartingPoint\getStartingObject(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getRoleStartingPointForm()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getRoleStartingPointForm ( )
protected

Definition at line 132 of file class.SettingsGUI.php.

133 {
134 if (!$this->rbac_system->checkAccess('write', $this->parent_ref_id)) {
135 $this->error->raiseError(
136 $this->lng->txt('msg_no_perm_read'),
137 $this->error->FATAL
138 );
139 }
140 $form = new \ilPropertyFormGUI();
141 $this->ctrl->saveParameter($this, ['spid']);
142
143 $starting_point_id = $this->user_request->getStartingPointId();
144 $starting_point = $this->getCurrentStartingPointOrNullForStartingPointForm($starting_point_id);
145 $starting_point_type = $this->getCurrentTypeForStartingPointForm($starting_point);
146 $req_role_id = $this->user_request->getRoleId();
147
148 foreach ($this->getFormTypeSpecificStartingPointFormParts($starting_point_id, $req_role_id) as $input) {
149 $form->addItem(
150 $input
151 );
152 }
153
154 $si = $this->getStartingPointSelectionInput($starting_point);
155 $si->setValue((string) $starting_point_type);
156 $form->addItem($si);
157
158 // save and cancel commands
159 $form->addCommandButton('saveStartingPoint', $this->lng->txt('save'));
160 $form->addCommandButton('startingPoints', $this->lng->txt('cancel'));
161
162 $form->setTitle($this->lng->txt('starting_point_settings'));
163 $form->setFormAction($this->ctrl->getFormAction($this));
164
165 return $form;
166 }
getStartingPointSelectionInput(?StartingPoint $st_point)
getFormTypeSpecificStartingPointFormParts(?int $spoint_id, ?int $req_role_id)
getCurrentStartingPointOrNullForStartingPointForm(?int $starting_point_id)
getCurrentTypeForStartingPointForm(?StartingPoint $starting_point)
error(string $a_errmsg)
This class represents a property form user interface.

References ILIAS\Repository\ctrl(), error(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getCurrentStartingPointOrNullForStartingPointForm(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getCurrentTypeForStartingPointForm(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getFormTypeSpecificStartingPointFormParts(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getStartingPointSelectionInput(), and ILIAS\Repository\lng().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\initRoleStartingPointForm().

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

◆ getStartingPointSelectionInput()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getStartingPointSelectionInput ( ?StartingPoint  $st_point)
private

Definition at line 248 of file class.SettingsGUI.php.

249 {
250 $si = new \ilRadioGroupInputGUI($this->lng->txt('adm_user_starting_point'), 'start_point');
251 $si->setRequired(true);
252 $si->setInfo($this->lng->txt('adm_user_starting_point_info'));
253 $valid = array_keys($this->starting_point_repository->getPossibleStartingPoints());
254 foreach ($this->starting_point_repository->getPossibleStartingPoints(true) as $value => $caption) {
255 $si->addOption(
256 $this->getStartingPointSelectionOption($value, $caption, $st_point, $valid)
257 );
258 }
259
260 return $si;
261 }
getStartingPointSelectionOption(int $value, string $caption, ?StartingPoint $st_point, array $valid)
$valid

References $valid, ILIAS\User\Settings\StartingPoint\SettingsGUI\getStartingPointSelectionOption(), and ILIAS\Repository\lng().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getRoleStartingPointForm().

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

◆ getStartingPointSelectionOption()

ILIAS\User\Settings\StartingPoint\SettingsGUI::getStartingPointSelectionOption ( int  $value,
string  $caption,
?StartingPoint  $st_point,
array  $valid 
)
private

Definition at line 263 of file class.SettingsGUI.php.

269 $opt = new \ilRadioOption($this->lng->txt($caption), (string) $value);
270
271 if ($value === Repository::START_PD_CALENDAR) {
272 $opt->addSubItem(
273 $this->getCalenderSubInputs($st_point)
274 );
275 }
276
277 if ($value === Repository::START_REPOSITORY_OBJ) {
278 $opt->addSubItem(
279 $this->getRepositoryObjectInput($st_point)
280 );
281 }
282
283 if (!in_array($value, $valid)) {
284 $opt->setInfo($this->lng->txt('adm_user_starting_point_invalid_info'));
285 }
286
287 return $opt;
288 }
This class represents an option in a radio group.

References ilRadioOption\addSubItem(), and ILIAS\User\Settings\StartingPoint\SettingsGUI\getCalenderSubInputs().

Referenced by ILIAS\User\Settings\StartingPoint\SettingsGUI\getStartingPointSelectionInput().

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

◆ initRoleStartingPointForm()

ILIAS\User\Settings\StartingPoint\SettingsGUI::initRoleStartingPointForm ( ?\ilPropertyFormGUI  $form = null)

Definition at line 124 of file class.SettingsGUI.php.

124 : void
125 {
126 if (!($form instanceof \ilPropertyFormGUI)) {
127 $form = $this->getRoleStartingPointForm();
128 }
129 $this->tpl->setContent($form->getHTML());
130 }

References ILIAS\User\Settings\StartingPoint\SettingsGUI\getRoleStartingPointForm().

+ Here is the call graph for this function:

◆ initUserStartingPointForm()

ILIAS\User\Settings\StartingPoint\SettingsGUI::initUserStartingPointForm ( ?\ilPropertyFormGUI  $form = null)

Definition at line 116 of file class.SettingsGUI.php.

116 : void
117 {
118 if (!($form instanceof \ilPropertyFormGUI)) {
119 $form = $this->getUserStartingPointForm();
120 }
121 $this->tpl->setContent($form->getHTML());
122 }

◆ saveOrder()

ILIAS\User\Settings\StartingPoint\SettingsGUI::saveOrder ( )

Definition at line 489 of file class.SettingsGUI.php.

489 : void
490 {
491 if (!$this->rbac_system->checkAccess('write', $this->parent_ref_id)) {
492 throw new \ilPermissionException($this->lng->txt('msg_no_perm_read'));
493 }
494
495 $positions = $this->user_request->getPositions();
496 if (count($positions) > 0) {
497 $this->starting_point_repository->saveOrder($positions);
498 }
499
500 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
501 $this->ctrl->redirect($this, 'startingPoints');
502 }

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

+ Here is the call graph for this function:

◆ saveStartingPoint()

ILIAS\User\Settings\StartingPoint\SettingsGUI::saveStartingPoint ( )
protected

store starting point from the form

Definition at line 354 of file class.SettingsGUI.php.

354 : void
355 {
356 if (!$this->rbac_system->checkAccess('write', $this->parent_ref_id)) {
357 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->FATAL);
358 }
359
360 $start_point_id = $this->user_request->getStartingPointId();
361
362 //add from form
363 $form = $this->getRoleStartingPointForm();
364
365 if (!$form->checkInput()) {
366 $form->setValuesByPost();
367 $this->tpl->setContent($form->getHTML());
368 return;
369 }
370
371 $starting_point = $this->starting_point_repository->getStartingPointById(
372 $start_point_id
373 );
374
375
376 $role_id = $this->user_request->getRoleId();
377
378 if ($form->getInput('role_type') === '1'
379 && ($role_id === null || $role_id < 1)) {
380 $parser = new \ilQueryParser($form->getInput('role_search'));
381
382 // TODO: Handle minWordLength
383 $parser->setMinWordLength(1);
384 $parser->setCombination(\ilQueryParser::QP_COMBINATION_AND);
385 $parser->parse();
386
387 $object_search = new \ilLikeObjectSearch($parser);
388 $object_search->setFilter(['role']);
389 $res = $object_search->performSearch();
390
391 $entries = $res->getEntries();
392
393 if ($entries === []) {
394 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_corresponding_roles'), true);
395 $form->setValuesByPost();
396 $this->tpl->setContent($form->getHTML());
397 return;
398 }
399
400 if (count($entries) > 1) {
401 $this->showRoleSelection(
402 $form->getInput('role'),
403 $form->getInput('role_search'),
404 $form->getInput('start_point'),
405 $form->getInput('start_object')
406 );
407 return;
408 }
409
410 if (count($entries) === 1) {
411 $role = current($entries);
412 $role_id = $role['obj_id'];
413 }
414 }
415
416 if ($role_id === 0) {
417 $role_id = $form->getInput('role');
418 }
419
420 if ($role_id !== 0) {
421 $starting_point->setRuleTypeRoleBased();
422 $rules = ['role_id' => $role_id];
423 $starting_point->setRuleOptions(serialize($rules));
424 }
425
426 $starting_point->setStartingPointType((int) $form->getInput('start_point'));
427
428 $obj_id = (int) $form->getInput('start_object');
429 $cal_view = (int) $form->getInput('user_calendar_view');
430 $cal_period = (int) $form->getInput('user_cal_period');
431
432
433 if ($starting_point->getStartingPointType() === Repository::START_REPOSITORY_OBJ
434 && (\ilObject::_lookupObjId($obj_id) === 0 || $this->tree->isDeleted($obj_id))) {
435 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('obj_ref_id_not_exist'), true);
436 $form->setValuesByPost();
437 $this->tpl->setContent($form->getHTML());
438 return;
439 }
440 $starting_point->setStartingObject($obj_id);
441
442 if ($starting_point->getStartingPointType() === Repository::START_PD_CALENDAR) {
443 $starting_point->setCalendarView($cal_view);
444 $starting_point->setCalendarPeriod($cal_period);
445 }
446
447 if ($start_point_id !== null) {
448 $this->starting_point_repository->update($starting_point);
449 } else {
450 $this->starting_point_repository->save($starting_point);
451 }
452
453 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
454 $this->ctrl->redirect($this, 'startingPoints');
455 }
showRoleSelection(string $role, string $role_search, string $start_point, string $start_object)
$res
Definition: ltiservices.php:69

References $res, ilObject\_lookupObjId(), ILIAS\Repository\ctrl(), error(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilQueryParser\QP_COMBINATION_AND, ILIAS\User\Settings\StartingPoint\Repository\START_PD_CALENDAR, and ILIAS\User\Settings\StartingPoint\Repository\START_REPOSITORY_OBJ.

+ Here is the call graph for this function:

◆ showRoleSelection()

ILIAS\User\Settings\StartingPoint\SettingsGUI::showRoleSelection ( string  $role,
string  $role_search,
string  $start_point,
string  $start_object 
)
private

Definition at line 457 of file class.SettingsGUI.php.

462 : void {
463 $parser = new \ilQueryParser($role_search);
464 $parser->setMinWordLength(1);
465 $parser->setCombination(\ilQueryParser::QP_COMBINATION_AND);
466 $parser->parse();
467
468 $object_search = new \ilLikeObjectSearch($parser);
469 $object_search->setFilter(['role']);
470 $res = $object_search->performSearch();
471
472 $entries = $res->getEntries();
473
474 $table = new \ilRoleSelectionTableGUI($this, 'saveStartingPoint');
475 $table->setLimit(9999);
476 $table->disable('sort');
477 $table->addHiddenInput('role_search', $role_search);
478 $table->addHiddenInput('start_point', $start_point);
479 $table->addHiddenInput('start_object', $start_object);
480 $table->addHiddenInput('role', $role);
481 $table->addHiddenInput('role_type', '1');
482 $table->setTitle($this->lng->txt('user_role_selection'));
483 $table->addMultiCommand('saveStartingPoint', $this->lng->txt('select'));
484 $table->parse($entries);
485
486 $this->tpl->setContent($table->getHTML());
487 }

◆ startingPoints()

ILIAS\User\Settings\StartingPoint\SettingsGUI::startingPoints ( )

table form to set up starting points depends of user roles

Definition at line 96 of file class.SettingsGUI.php.

96 : void
97 {
98 $this->toolbar->addComponent(
99 $this->ui_factory->link()->standard(
100 $this->lng->txt('create_starting_point'),
101 $this->ctrl->getLinkTarget($this, "roleStartingPointform")
102 )
103 );
104
105 $tbl = new \ilUserRoleStartingPointTableGUI(
106 $this,
107 $this->starting_point_repository,
108 $this->rbac_review,
109 $this->ui_factory,
110 $this->ui_renderer,
111 );
112
113 $this->tpl->setContent($tbl->getHTML());
114 }

References ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ILIAS\User\Settings\StartingPoint\SettingsGUI::$ctrl
private

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

◆ $db

ilDBInterface ILIAS\User\Settings\StartingPoint\SettingsGUI::$db
private

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

◆ $lng

Language ILIAS\User\Settings\StartingPoint\SettingsGUI::$lng
private

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

◆ $log

ilLogger ILIAS\User\Settings\StartingPoint\SettingsGUI::$log
private

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

◆ $parent_ref_id

int ILIAS\User\Settings\StartingPoint\SettingsGUI::$parent_ref_id
private

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

◆ $rbac_review

ilRbacReview ILIAS\User\Settings\StartingPoint\SettingsGUI::$rbac_review
private

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

◆ $rbac_system

ilRbacSystem ILIAS\User\Settings\StartingPoint\SettingsGUI::$rbac_system
private

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

◆ $settings

ilSetting ILIAS\User\Settings\StartingPoint\SettingsGUI::$settings
private

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

◆ $starting_point_repository

Repository ILIAS\User\Settings\StartingPoint\SettingsGUI::$starting_point_repository
private

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

◆ $tabs

ilTabsGUI ILIAS\User\Settings\StartingPoint\SettingsGUI::$tabs
private

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

◆ $toolbar

ilToolbarGUI ILIAS\User\Settings\StartingPoint\SettingsGUI::$toolbar
private

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

◆ $tpl

ilGlobalTemplateInterface ILIAS\User\Settings\StartingPoint\SettingsGUI::$tpl
private

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

◆ $tree

ilTree ILIAS\User\Settings\StartingPoint\SettingsGUI::$tree
private

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

◆ $ui_factory

UIFactory ILIAS\User\Settings\StartingPoint\SettingsGUI::$ui_factory
private

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

◆ $ui_renderer

Renderer ILIAS\User\Settings\StartingPoint\SettingsGUI::$ui_renderer
private

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

◆ $user

ilObjUser ILIAS\User\Settings\StartingPoint\SettingsGUI::$user
private

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

◆ $user_request

UserGUIRequest ILIAS\User\Settings\StartingPoint\SettingsGUI::$user_request
private

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


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