ILIAS  release_8 Revision v8.24
ilUserProfileBadgeGUI Class Reference

User profile badge gui. More...

+ Inheritance diagram for ilUserProfileBadgeGUI:
+ Collaboration diagram for ilUserProfileBadgeGUI:

Public Member Functions

 __construct ()
 
 initConfigForm (ilPropertyFormGUI $a_form, int $a_parent_ref_id)
 Add custom fields to form. More...
 
 importConfigToForm (ilPropertyFormGUI $a_form, array $a_config)
 Set form values. More...
 
 getConfigFromForm (ilPropertyFormGUI $a_form)
 Export values to DB. More...
 
 validateForm (ilPropertyFormGUI $a_form)
 Custom form validation. More...
 
 initConfigForm (ilPropertyFormGUI $a_form, int $a_parent_ref_id)
 Add custom fields to form. More...
 
 importConfigToForm (ilPropertyFormGUI $a_form, array $a_config)
 Set form values. More...
 
 getConfigFromForm (ilPropertyFormGUI $a_form)
 Export values to DB. More...
 
 validateForm (ilPropertyFormGUI $a_form)
 Custom form validation. More...
 

Private Attributes

RequestInterface $request
 

Detailed Description

User profile badge gui.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 25 of file class.ilUserProfileBadgeGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserProfileBadgeGUI::__construct ( )

Definition at line 29 of file class.ilUserProfileBadgeGUI.php.

30 {
31 global $DIC;
32
33 $this->request = $DIC->http()->request();
34 }
global $DIC
Definition: feed.php:28

References $DIC.

Member Function Documentation

◆ getConfigFromForm()

ilUserProfileBadgeGUI::getConfigFromForm ( ilPropertyFormGUI  $a_form)

Export values to DB.

Implements ilBadgeTypeGUI.

Definition at line 64 of file class.ilUserProfileBadgeGUI.php.

64 : array // Missing array type.
65 {
66 $fields = array();
67 foreach (array_keys($this->request->getParsedBody()) as $id) {
68 if (strpos($id, "chk_") === 0) {
69 $fields[] = $id;
70 }
71 }
72
73 return array("profile" => $fields);
74 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

◆ importConfigToForm()

ilUserProfileBadgeGUI::importConfigToForm ( ilPropertyFormGUI  $a_form,
array  $a_config 
)

Set form values.

Implements ilBadgeTypeGUI.

Definition at line 49 of file class.ilUserProfileBadgeGUI.php.

49 : void // Missing array type.
50 {
51 if (is_array($a_config["profile"])) {
52 $group = $a_form->getItemByPostVar("profile");
53 foreach ($group->getSubItems() as $field) {
54 foreach ($a_config["profile"] as $id) {
55 if ($field->getPostVar() == $id) {
56 $field->setChecked(true);
57 break;
58 }
59 }
60 }
61 }
62 }
getItemByPostVar(string $a_post_var)

References $id, and ilPropertyFormGUI\getItemByPostVar().

+ Here is the call graph for this function:

◆ initConfigForm()

ilUserProfileBadgeGUI::initConfigForm ( ilPropertyFormGUI  $a_form,
int  $a_parent_ref_id 
)

Add custom fields to form.

Implements ilBadgeTypeGUI.

Definition at line 36 of file class.ilUserProfileBadgeGUI.php.

36 : void
37 {
38 global $DIC;
39
40 $lng = $DIC['lng'];
41
42 $fields = new ilCheckboxGroupInputGUI($lng->txt("profile"), "profile");
43 $a_form->addItem($fields);
44
45 $gui = new ilPersonalProfileGUI();
46 $gui->showPublicProfileFields($a_form, array(), $fields, true);
47 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for personal profile.
$lng

References $DIC, $lng, and ilPropertyFormGUI\addItem().

+ Here is the call graph for this function:

◆ validateForm()

ilUserProfileBadgeGUI::validateForm ( ilPropertyFormGUI  $a_form)

Custom form validation.

Implements ilBadgeTypeGUI.

Definition at line 76 of file class.ilUserProfileBadgeGUI.php.

76 : bool
77 {
78 return true;
79 }

Field Documentation

◆ $request

RequestInterface ilUserProfileBadgeGUI::$request
private

Definition at line 27 of file class.ilUserProfileBadgeGUI.php.


The documentation for this class was generated from the following file: