◆ __construct()
◆ 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 178 of file class.ilECSUserConsentModalGUI.php.
References $id, $valid, initConsentForm(), ILIAS\Repository\lng(), null, saveConsent(), and ILIAS\UI\Implementation\Component\withOnLoadCode().
Referenced by addConsentModalToCard(), addConsentModalToToolbar(), and getTitleLink().
182 $form_id =
'form_' . $form->getId();
183 $agree = $this->ui_factory->button()
184 ->primary($this->
lng->txt(
'ecs_consent_modal_btn_accept'),
'#')
186 function (
$id) use ($form_id) {
187 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
191 $submitted = (string) ($this->request->getParsedBody()[
'cmd'] ??
'');
194 if (strcmp($submitted,
'submit') === 0) {
196 $form->setValuesByPost();
197 $error = $this->ui_factory->messageBox()->failure(
198 $this->
lng->txt(
'ecs_consent_required')
200 $error_html = $this->ui_renderer->render([$error]);
205 $modal = $this->ui_factory->modal()->roundtrip(
206 $this->
lng->txt(
'ecs_consent_modal_title'),
207 $this->ui_factory->legacy()->content(
211 )->withActionButtons([$agree]);
213 $modal = $modal->withOnLoad($modal->getShowSignal());
217 if ($a_trigger_type === self::TRIGGER_TYPE_STANDARD) {
218 $button = $this->ui_factory->button()->standard(
219 $this->
lng->txt($this->remote_object->getType() .
'_call'),
222 $modal->getShowSignal()
224 } elseif ($a_trigger_type === self::TRIGGER_TYPE_SHY) {
225 $button = $this->ui_factory->button()->shy(
226 $this->remote_object->getTitle(),
229 $modal->getShowSignal()
232 return [$button, $modal];
withOnLoadCode(Closure $binder)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 261 of file class.ilECSUserConsentModalGUI.php.
References $provider, ilObject\_lookupTitle(), getGUIClassName(), getOrganisation(), ILIAS\Repository\lng(), and lookupOrganization().
Referenced by getConsentModalComponents().
264 $form->setId(uniqid(
'form',
false));
265 $form->setFormAction(
'#');
268 $ref_id_hidden->setValue((
string) $this->ref_id);
269 $form->addItem($ref_id_hidden);
272 $form->addItem($ref_type_hidden);
274 $this->
lng->txt(
'title'),
280 $form->addItem($title);
283 $this->
lng->txt(
'ecs_form_target_platform'),
287 $form->addItem($target);
293 $this->
lng->txt(
'organization'),
296 $provider->setValue($organisation->getName());
301 $this->
lng->txt(
'ecs_form_consent'),
304 $consent->setValue(
"1");
305 $consent->setChecked($this->consents->hasConsented($this->server_id, $this->mid));
306 $consent->setRequired(
true);
307 $form->addItem($consent);
309 $user_data_fields = [];
316 $user_data_fields[] = $this->
lng->txt(
'ecs_' . $field);
318 $listing = $this->ui_factory->listing()->unordered($user_data_fields);
319 $listing_html = $this->ui_renderer->render([$listing]);
320 $consent->setOptionTitle(
322 'ecs_form_consent_option_title' 323 ) .
'<br />' . $listing_html
326 $submit->setValue(
'submit');
327 $form->addItem($submit);
static _lookupTitle(int $obj_id)
◆ initMidAndServer()
ilECSUserConsentModalGUI::initMidAndServer |
( |
| ) |
|
|
protected |
◆ initRemoteObject()
ilECSUserConsentModalGUI::initRemoteObject |
( |
| ) |
|
|
protected |
◆ 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: