59 $this->tpl =
$DIC->ui()->mainTemplate();
60 $this->
tabs = $DIC->tabs();
61 $this->
ctrl = $DIC->ctrl();
62 $this->
lng = $DIC->language();
63 $this->
access = $DIC->bookingManager()->internal()->domain()->access();
64 $this->
toolbar = $DIC->toolbar();
65 $this->book_request =
$DIC
71 $this->ui_factory =
$DIC->ui()->factory();
72 $this->ui_renderer =
$DIC->ui()->renderer();
74 $this->ui_service =
$DIC->uiService();
75 $this->data_factory =
new Factory();
78 $this->ref_id = $a_parent_obj->
getRefId();
79 $this->pool_id = $a_parent_obj->
getObject()->getId();
81 $this->
lng->loadLanguageModule(
'book');
82 $this->
lng->loadLanguageModule(
'exc');
87 switch ($this->
ctrl->getNextClass($this)) {
88 case strtolower(ilRepositorySearchGUI::class):
90 $rep_search->addUserAccessFilterCallable(
91 fn(array $a_user_id): array => $this->
access->filterManageableParticipants($this->ref_id, $a_user_id)
93 $rep_search->setTitle($this->
lng->txt(
'book_add_participant'));
94 $rep_search->setCallback($this,
'addParticipantObject');
95 $this->
ctrl->setReturn($this,
'render');
96 $this->
ctrl->forwardCommand($rep_search);
100 $cmd = $this->
ctrl->getCmd(
'render');
101 if (method_exists($this, $cmd)) {
116 if (!$this->
access->canManageParticipants($this->ref_id)) {
124 'auto_complete_name' => $this->
lng->txt(
'user'),
125 'submit_name' => $this->lng->txt(
'add'),
126 'add_search' =>
true,
127 'add_from_container' => $this->ref_id
131 $this->tpl->setContent(
132 $this->ui_renderer->render(
133 $this->configureParticipantTable()->getComponents($this->getTableActionUrlBuilder())
140 if (trim($this->book_request->getUserLogin()) ===
'') {
141 $this->tpl->setOnScreenMessage(
143 $this->
lng->txt(
'msg_no_search_string')
150 foreach (explode(
',', $this->book_request->getUserLogin()) as $user) {
154 $this->tpl->setOnScreenMessage(
156 $this->
lng->txt(
'user_not_known')
176 if ($participant_obj->getIsNew()) {
177 $this->tpl->setOnScreenMessage(
179 $this->
lng->txt(
'book_participant_assigned'),
185 $this->tpl->setOnScreenMessage(
187 $this->
lng->txt(
'book_participant_already_assigned'),
193 $this->tpl->setOnScreenMessage(
195 'dummy error message, change me'
200 $this->
ctrl->redirect($this,
'render');
206 $this->
tabs->clearTargets();
207 $this->
tabs->setBackTarget($this->
lng->txt(
'book_back_to_list'), $this->ctrl->getLinkTarget($this,
'render'));
210 $this->tpl->setContent($table->getHTML());
226 $this->participant_repository,
234 return new URLBuilder($this->data_factory->uri(
235 ILIAS_HTTP_PATH .
'/' . $this->ctrl->getLinkTargetByClass(self::class,
'executeTableAction')
Builds a Color from either hex- or rgb values.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
@ilCtrl_Calls ilBookingParticipantGUI: ilRepositorySearchGUI
addParticipantObject(array $a_user_ids)
__construct(ilObjBookingPoolGUI $a_parent_obj)
getTableActionUrlBuilder()
readonly Factory $data_factory
readonly ilUIService $ui_service
readonly UIRenderer $ui_renderer
StandardGUIRequest $book_request
readonly UIFactory $ui_factory
readonly ParticipantRepository $participant_repository
readonly HttpService $http
ilGlobalTemplateInterface $tpl
readonly Refinery $refinery
addUserFromAutoCompleteObject()
configureParticipantTable()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
@ilCtrl_Calls ilObjBookingPoolGUI: ilPermissionGUI, ilBookingObjectGUI @ilCtrl_Calls ilObjBookingPool...
static _lookupId(string|array $a_user_str)
static _lookupType(int $id, bool $reference=false)
static fillAutoCompleteToolbar(object $parent_object, ?ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const MESSAGE_TYPE_SUCCESS
const MESSAGE_TYPE_FAILURE
An entity that renders components to a string output.
static http()
Fetches the global http state from ILIAS.