ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 47 of file class.ilUserProfileBadgeGUI.php.

References $_POST, and array.

48  {
49  $fields = array();
50  foreach(array_keys($_POST) as $id)
51  {
52  if(substr($id, 0, 4) == "chk_")
53  {
54  $fields[] = $id;
55  }
56  }
57 
58  return array("profile" => $fields);
59  }
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 ilPropertyFormGUI\getItemByPostVar().

29  {
30  if(is_array($a_config["profile"]))
31  {
32  $group = $a_form->getItemByPostVar("profile");
33  foreach($group->getSubItems() as $field)
34  {
35  foreach($a_config["profile"] as $id)
36  {
37  if($field->getPostVar() == $id)
38  {
39  $field->setChecked(true);
40  break;
41  }
42  }
43  }
44  }
45  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
+ 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 61 of file class.ilUserProfileBadgeGUI.php.

62  {
63  return true;
64  }

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