◆ __construct()
ilECSUserConsentModalGUI::__construct |
( |
int |
$a_usr_id, |
|
|
int |
$a_ref_id, |
|
|
ilRemoteObjectBaseGUI |
$remote_gui = null |
|
) |
| |
◆ addConsentModalToCard()
◆ addConsentModalToToolbar()
ilECSUserConsentModalGUI::addConsentModalToToolbar |
( |
ilToolbarGUI |
$toolbar | ) |
|
◆ addLinkToToolbar()
ilECSUserConsentModalGUI::addLinkToToolbar |
( |
ilToolbarGUI |
$toolbar | ) |
|
◆ addRemoteLinkToToolbar()
ilECSUserConsentModalGUI::addRemoteLinkToToolbar |
( |
ilToolbarGUI |
$toolbar | ) |
|
|
protected |
◆ getConsentModalComponents()
ilECSUserConsentModalGUI::getConsentModalComponents |
( |
int |
$a_trigger_type = self::TRIGGER_TYPE_STANDARD | ) |
|
|
protected |
Definition at line 176 of file class.ilECSUserConsentModalGUI.php.
References $id, $valid, initConsentForm(), ILIAS\Repository\lng(), and saveConsent().
Referenced by addConsentModalToCard(), addConsentModalToToolbar(), and getTitleLink().
180 $form_id =
'form_' . $form->getId();
181 $agree = $this->ui_factory->button()
182 ->primary(
'Agree and Proceed',
'#')
184 function (
$id) use ($form_id) {
185 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
189 $submitted = (string) ($this->request->getParsedBody()[
'cmd'] ??
'');
192 if (strcmp($submitted,
'submit') === 0) {
194 $form->setValuesByPost();
195 $error = $this->ui_factory->messageBox()->failure(
196 $this->
lng->txt(
'ecs_consent_required')
198 $error_html = $this->ui_renderer->render([$error]);
203 $modal = $this->ui_factory->modal()->roundtrip(
204 $this->
lng->txt(
'ecs_consent_modal_title'),
205 $this->ui_factory->legacy(
209 )->withActionButtons([$agree]);
211 $modal = $modal->withOnLoad($modal->getShowSignal());
215 if ($a_trigger_type === self::TRIGGER_TYPE_STANDARD) {
216 $button = $this->ui_factory->button()->standard(
217 $this->
lng->txt($this->remote_object->getType() .
'_call'),
220 $modal->getShowSignal()
222 } elseif ($a_trigger_type === self::TRIGGER_TYPE_SHY) {
223 $button = $this->ui_factory->button()->shy(
224 $this->remote_object->getTitle(),
227 $modal->getShowSignal()
230 return [$button, $modal];
saveConsent(ilPropertyFormGUI $form)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ getGUIClassName()
ilECSUserConsentModalGUI::getGUIClassName |
( |
| ) |
|
|
protected |
◆ getOrganisation()
ilECSUserConsentModalGUI::getOrganisation |
( |
| ) |
|
|
protected |
◆ getTitleLink()
ilECSUserConsentModalGUI::getTitleLink |
( |
| ) |
|
◆ hasConsented()
ilECSUserConsentModalGUI::hasConsented |
( |
| ) |
|
◆ initConsentForm()
ilECSUserConsentModalGUI::initConsentForm |
( |
| ) |
|
|
protected |
Definition at line 259 of file class.ilECSUserConsentModalGUI.php.
References $provider, ilObject\_lookupTitle(), getGUIClassName(), getOrganisation(), ILIAS\Repository\lng(), lookupOrganization(), ilCheckboxInputGUI\setValue(), and ilNonEditableValueGUI\setValue().
Referenced by getConsentModalComponents().
262 $form->setId(uniqid(
'form',
false));
263 $form->setFormAction(
'#');
266 $ref_id_hidden->setValue((
string) $this->ref_id);
267 $form->addItem($ref_id_hidden);
270 $form->addItem($ref_type_hidden);
272 $this->
lng->txt(
'title'),
278 $form->addItem($title);
281 $this->
lng->txt(
'ecs_form_target_platform'),
285 $form->addItem($target);
291 $this->
lng->txt(
'organization'),
294 $provider->setValue($organisation->getName());
299 $this->
lng->txt(
'ecs_form_consent'),
303 $consent->setChecked($this->consents->hasConsented($this->server_id, $this->mid));
304 $consent->setRequired(
true);
305 $form->addItem($consent);
307 $user_data_fields = [];
314 $user_data_fields[] = $this->
lng->txt(
'ecs_' . $field);
316 $listing = $this->ui_factory->listing()->unordered($user_data_fields);
317 $listing_html = $this->ui_renderer->render([$listing]);
318 $consent->setOptionTitle(
320 'ecs_form_consent_option_title' 321 ) .
'<br />' . $listing_html
324 $submit->setValue(
'submit');
325 $form->addItem($submit);
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ initMidAndServer()
ilECSUserConsentModalGUI::initMidAndServer |
( |
| ) |
|
|
protected |
◆ initRemoteObject()
ilECSUserConsentModalGUI::initRemoteObject |
( |
| ) |
|
|
protected |
- Exceptions
-
Definition at line 358 of file class.ilECSUserConsentModalGUI.php.
References ilObjectFactory\getInstanceByRefId().
Referenced by __construct().
363 'Invalid ref_id given: ' . $this->ref_id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Remote object app base class.
◆ isLocalObject()
ilECSUserConsentModalGUI::isLocalObject |
( |
| ) |
|
|
protected |
◆ lookupOrganization()
ilECSUserConsentModalGUI::lookupOrganization |
( |
| ) |
|
|
protected |
◆ saveConsent()
◆ $consents
◆ $ctrl
◆ $exportManager
◆ $importManager
◆ $lng
◆ $mid
int ilECSUserConsentModalGUI::$mid |
|
private |
◆ $obj_id
int ilECSUserConsentModalGUI::$obj_id |
|
private |
◆ $objDefinition
◆ $ref_id
int ilECSUserConsentModalGUI::$ref_id |
|
private |
◆ $remote_gui
◆ $remote_object
◆ $request
RequestInterface ilECSUserConsentModalGUI::$request |
|
protected |
◆ $server_id
int ilECSUserConsentModalGUI::$server_id |
|
private |
◆ $toolbar
◆ $ui_factory
UIFactory ilECSUserConsentModalGUI::$ui_factory |
|
protected |
◆ $ui_renderer
UIRenderer ilECSUserConsentModalGUI::$ui_renderer |
|
protected |
◆ $usr_id
int ilECSUserConsentModalGUI::$usr_id |
|
private |
◆ CMD_RENDER_MODAL
const ilECSUserConsentModalGUI::CMD_RENDER_MODAL = 'renderConsentModal' |
◆ CMD_SAVE_CONSENT
const ilECSUserConsentModalGUI::CMD_SAVE_CONSENT = 'saveConsent' |
◆ TRIGGER_TYPE_CARD
const ilECSUserConsentModalGUI::TRIGGER_TYPE_CARD = 3 |
|
protected |
◆ TRIGGER_TYPE_SHY
const ilECSUserConsentModalGUI::TRIGGER_TYPE_SHY = 1 |
|
protected |
◆ TRIGGER_TYPE_STANDARD
const ilECSUserConsentModalGUI::TRIGGER_TYPE_STANDARD = 2 |
|
protected |
The documentation for this class was generated from the following file: