ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 43 of file class.ilUserProfileBadgeGUI.php.

References $_POST, $id, and array.

44  {
45  $fields = array();
46  foreach (array_keys($_POST) as $id) {
47  if (substr($id, 0, 4) == "chk_") {
48  $fields[] = $id;
49  }
50  }
51 
52  return array("profile" => $fields);
53  }
if(!array_key_exists('StateId', $_REQUEST)) $id
Create styles array
The data for the language used.
$_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 28 of file class.ilUserProfileBadgeGUI.php.

References $id, and ilPropertyFormGUI\getItemByPostVar().

29  {
30  if (is_array($a_config["profile"])) {
31  $group = $a_form->getItemByPostVar("profile");
32  foreach ($group->getSubItems() as $field) {
33  foreach ($a_config["profile"] as $id) {
34  if ($field->getPostVar() == $id) {
35  $field->setChecked(true);
36  break;
37  }
38  }
39  }
40  }
41  }
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 $lng, ilPropertyFormGUI\addItem(), and array.

17  {
18  global $lng;
19 
20  $fields = new ilCheckboxGroupInputGUI($lng->txt("profile"), "profile");
21  $a_form->addItem($fields);
22 
23  include_once "Services/User/classes/class.ilPersonalProfileGUI.php";
24  $gui = new ilPersonalProfileGUI();
25  $gui->showPublicProfileFields($a_form, array(), $fields, true);
26  }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
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 55 of file class.ilUserProfileBadgeGUI.php.

56  {
57  return true;
58  }

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