78 $logout_group = $this->ui_factory->input()->field()
81 $this->
lng->txt(
'destination_logout_screen')
84 $login_group = $this->ui_factory->input()->field()
87 $this->
lng->txt(
'destination_login_screen'),
88 $this->
lng->txt(
'destination_login_screen_info')
91 $ref_id = $this->ui_factory->input()->field()
92 ->numeric($this->
lng->txt(
'destination_internal_ressource_ref_id'))
94 $this->
refinery->custom()->constraint(
95 fn($value) => $this->configurable_logout_target->isInRepository($value),
96 fn(callable
$txt, $value) =>
$txt(
'logout_behaviour_invalid_ref_id', $value)
99 ->withAdditionalTransformation(
100 $this->
refinery->custom()->constraint(
101 fn($value) => $this->configurable_logout_target->isAnonymousAccessible(
105 'logout_behaviour_ref_id_no_access',
110 ->withValue($this->
settings->get(
'logout_behaviour_ref_id',
''));
111 if (isset($errors[
'ref_id'])) {
115 $internal_group = $this->ui_factory->input()->field()
118 $this->
lng->txt(
'destination_internal_ressource')
121 $url = $this->
settings->get(
'logout_behaviour_url',
'');
122 $html = $this->ui_factory->input()->field()
123 ->url($this->
lng->txt(
'destination_external_ressource_url'))
125 $this->
refinery->custom()->constraint(
126 fn($value) => $this->configurable_logout_target->isValidExternalResource(
129 fn(callable
$txt, $value) =>
$txt(
'logout_behaviour_invalid_url', $value)
133 if (isset($errors[
'url'])) {
134 $html = $html->withError($errors[
'url']);
137 $external_group = $this->ui_factory->input()->field()
140 $this->
lng->txt(
'destination_external_ressource')
143 $logout_behaviour_switchable_group = $this->ui_factory->input()->field()
146 LogoutDestinations::LOGOUT_SCREEN->value => $logout_group,
147 LogoutDestinations::LOGIN_SCREEN->value => $login_group,
148 ConfigurableLogoutTarget::INTERNAL_RESSOURCE => $internal_group,
149 ConfigurableLogoutTarget::EXTERNAL_RESSOURCE => $external_group
151 $this->
lng->txt(
'destination_after_logout')
156 LogoutDestinations::LOGOUT_SCREEN->value
160 $section = $this->ui_factory->input()->field()
162 [
'logout_behaviour_settings' => $logout_behaviour_switchable_group],
163 $this->
lng->txt(
'logout_behaviour_settings')
166 $form = $this->ui_factory->input()->container()->form()
168 $this->
ctrl->getFormAction($this,
'saveForm'),
169 [
'logout_behaviour' => $section]
172 $form = $form->withRequest($request);