ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUserProfileBadgeGUI Class Reference

User profile badge gui. More...

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

Public Member Functions

 initConfigForm (ilPropertyFormGUI $a_form, $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...
 

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
Version
$Id:$

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

Member Function Documentation

◆ getConfigFromForm()

ilUserProfileBadgeGUI::getConfigFromForm ( ilPropertyFormGUI  $a_form)

Export values to DB.

Parameters
ilPropertyFormGUI$a_form
Returns
array

Implements ilBadgeTypeGUI.

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

References $_POST, and $id.

46  {
47  $fields = array();
48  foreach (array_keys($_POST) as $id) {
49  if (substr($id, 0, 4) == "chk_") {
50  $fields[] = $id;
51  }
52  }
53 
54  return array("profile" => $fields);
55  }
if(!array_key_exists('StateId', $_REQUEST)) $id
$_POST["username"]

◆ importConfigToForm()

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

Set form values.

Parameters
ilPropertyFormGUI$a_form
array$a_config

Implements ilBadgeTypeGUI.

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

References $id, and ilPropertyFormGUI\getItemByPostVar().

31  {
32  if (is_array($a_config["profile"])) {
33  $group = $a_form->getItemByPostVar("profile");
34  foreach ($group->getSubItems() as $field) {
35  foreach ($a_config["profile"] as $id) {
36  if ($field->getPostVar() == $id) {
37  $field->setChecked(true);
38  break;
39  }
40  }
41  }
42  }
43  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
if(!array_key_exists('StateId', $_REQUEST)) $id
+ Here is the call graph for this function:

◆ initConfigForm()

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

Add custom fields to form.

Parameters
ilPropertyFormGUI$a_form
int$a_parent_ref_id

Implements ilBadgeTypeGUI.

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

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

17  {
18  global $DIC;
19 
20  $lng = $DIC['lng'];
21 
22  $fields = new ilCheckboxGroupInputGUI($lng->txt("profile"), "profile");
23  $a_form->addItem($fields);
24 
25  include_once "Services/User/classes/class.ilPersonalProfileGUI.php";
26  $gui = new ilPersonalProfileGUI();
27  $gui->showPublicProfileFields($a_form, array(), $fields, true);
28  }
global $DIC
Definition: saml.php:7
addItem($a_item)
Add Item (Property, SectionHeader).
$lng
This class represents a property in a property form.
GUI class for personal profile.
+ Here is the call graph for this function:

◆ validateForm()

ilUserProfileBadgeGUI::validateForm ( ilPropertyFormGUI  $a_form)

Custom form validation.

Parameters
ilPropertyFormGUI$a_form
Returns
bool

Implements ilBadgeTypeGUI.

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

58  {
59  return true;
60  }

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