ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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
 
ilErrorHandling $error
 
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 348 of file class.SettingsGUI.php.

348 : void
349 {
351 }
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 506 of file class.SettingsGUI.php.

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

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 85 of file class.SettingsGUI.php.

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

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 292 of file class.SettingsGUI.php.

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

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

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 170 of file class.SettingsGUI.php.

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

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 181 of file class.SettingsGUI.php.

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

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 229 of file class.SettingsGUI.php.

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

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 190 of file class.SettingsGUI.php.

190 : \Generator
191 { //edit no default
192 if ($spoint_id === null) {
193 yield $this->getCreateFormSpecificInputs();
194 } else {
195 yield from $this->getEditFormSpecificInputs($spoint_id, $req_role_id);
196 }
197 }
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 326 of file class.SettingsGUI.php.

327 {
328 $repobj_id = new \ilTextInputGUI($this->lng->txt('adm_user_starting_point_ref_id'), 'start_object');
329 $repobj_id->setRequired(true);
330 $repobj_id->setSize(5);
331
332 if ($st_point !== null) {
333 $start_ref_id = $st_point->getStartingObject();
334 $repobj_id->setValue($start_ref_id);
335 }
336
337 if (isset($start_ref_id)) {
338 $start_obj_id = \ilObject::_lookupObjId($start_ref_id);
339 if ($start_obj_id) {
340 $repobj_id->setInfo($this->lng->txt('obj_' . \ilObject::_lookupType($start_obj_id)) .
341 ': ' . \ilObject::_lookupTitle($start_obj_id));
342 }
343 }
344
345 return $repobj_id;
346 }
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 134 of file class.SettingsGUI.php.

135 {
136 if (!$this->rbac_system->checkAccess('write', $this->parent_ref_id)) {
137 $this->error->raiseError(
138 $this->lng->txt('msg_no_perm_read'),
139 $this->error->FATAL
140 );
141 }
142 $form = new \ilPropertyFormGUI();
143 $this->ctrl->saveParameter($this, ['spid']);
144
145 $starting_point_id = $this->user_request->getStartingPointId();
146 $starting_point = $this->getCurrentStartingPointOrNullForStartingPointForm($starting_point_id);
147 $starting_point_type = $this->getCurrentTypeForStartingPointForm($starting_point);
148 $req_role_id = $this->user_request->getRoleId();
149
150 foreach ($this->getFormTypeSpecificStartingPointFormParts($starting_point_id, $req_role_id) as $input) {
151 $form->addItem(
152 $input
153 );
154 }
155
156 $si = $this->getStartingPointSelectionInput($starting_point);
157 $si->setValue((string) $starting_point_type);
158 $form->addItem($si);
159
160 // save and cancel commands
161 $form->addCommandButton('saveStartingPoint', $this->lng->txt('save'));
162 $form->addCommandButton('startingPoints', $this->lng->txt('cancel'));
163
164 $form->setTitle($this->lng->txt('starting_point_settings'));
165 $form->setFormAction($this->ctrl->getFormAction($this));
166
167 return $form;
168 }
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 250 of file class.SettingsGUI.php.

251 {
252 $si = new \ilRadioGroupInputGUI($this->lng->txt('adm_user_starting_point'), 'start_point');
253 $si->setRequired(true);
254 $si->setInfo($this->lng->txt('adm_user_starting_point_info'));
255 $valid = array_keys($this->starting_point_repository->getPossibleStartingPoints());
256 foreach ($this->starting_point_repository->getPossibleStartingPoints(true) as $value => $caption) {
257 $si->addOption(
258 $this->getStartingPointSelectionOption($value, $caption, $st_point, $valid)
259 );
260 }
261
262 return $si;
263 }
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 265 of file class.SettingsGUI.php.

271 $opt = new \ilRadioOption($this->lng->txt($caption), (string) $value);
272
273 if ($value === Repository::START_PD_CALENDAR) {
274 $opt->addSubItem(
275 $this->getCalenderSubInputs($st_point)
276 );
277 }
278
279 if ($value === Repository::START_REPOSITORY_OBJ) {
280 $opt->addSubItem(
281 $this->getRepositoryObjectInput($st_point)
282 );
283 }
284
285 if (!in_array($value, $valid)) {
286 $opt->setInfo($this->lng->txt('adm_user_starting_point_invalid_info'));
287 }
288
289 return $opt;
290 }
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 126 of file class.SettingsGUI.php.

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

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 118 of file class.SettingsGUI.php.

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

◆ saveOrder()

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

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

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

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 356 of file class.SettingsGUI.php.

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

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

◆ startingPoints()

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

table form to set up starting points depends of user roles

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

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

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.

◆ $error

ilErrorHandling ILIAS\User\Settings\StartingPoint\SettingsGUI::$error
private

Definition at line 47 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 49 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: