ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilADTGroupActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTGroupActiveRecordBridge:
+ Collaboration diagram for ilADTGroupActiveRecordBridge:

Public Member Functions

 getFieldValue ($a_field_name)
 
 setFieldValue ($a_field_name, $a_field_value)
 
 getElements ()
 
 getElement ($a_element_id)
 
 getActiveRecordFields ()
 
- Public Member Functions inherited from ilADTActiveRecordBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 Get ADT. More...
 
 setTable ($a_table)
 Set table name. More...
 
 getTable ()
 Get table name. More...
 
 setElementId ($a_value)
 Set element id (aka DB column[s] [prefix]) More...
 
 getElementId ()
 Get element id. More...
 
 setPrimary (array $a_value)
 Set primary fields (in MDB2 format) More...
 
 getPrimary ()
 Get primary fields. More...
 
 getActiveRecordFields ()
 Convert ADT to active record fields. More...
 
 getFieldValue ($a_field_name)
 Get field value. More...
 
 setFieldValue ($a_field_name, $a_field_value)
 Set field value. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 
 prepareElements ()
 
- Protected Member Functions inherited from ilADTActiveRecordBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 

Protected Attributes

 $elements = []
 
- Protected Attributes inherited from ilADTActiveRecordBridge
 $adt
 
 $id
 
 $tabe
 
 $primary = []
 

Detailed Description

Definition at line 5 of file class.ilADTGroupActiveRecordBridge.php.

Member Function Documentation

◆ getActiveRecordFields()

ilADTGroupActiveRecordBridge::getActiveRecordFields ( )

Definition at line 69 of file class.ilADTGroupActiveRecordBridge.php.

References getElements().

70  {
71  $fields = array();
72  foreach ($this->getElements() as $element_id => $element) {
73  $element_fields = $element->getActiveRecordFields();
74  if ($element_fields) {
75  $fields[$element_id] = $element_fields;
76  }
77  }
78  return $fields;
79  }
+ Here is the call graph for this function:

◆ getElement()

ilADTGroupActiveRecordBridge::getElement (   $a_element_id)

Definition at line 58 of file class.ilADTGroupActiveRecordBridge.php.

References getElements().

59  {
60  if (array_key_exists($a_element_id, $this->getElements())) {
61  return $this->elements[$a_element_id];
62  }
63  }
+ Here is the call graph for this function:

◆ getElements()

ilADTGroupActiveRecordBridge::getElements ( )

Definition at line 52 of file class.ilADTGroupActiveRecordBridge.php.

References $elements, and prepareElements().

Referenced by getActiveRecordFields(), getElement(), and prepareElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldValue()

ilADTGroupActiveRecordBridge::getFieldValue (   $a_field_name)

Definition at line 18 of file class.ilADTGroupActiveRecordBridge.php.

19  {
20  // TODO: Implement getFieldValue() method.
21  }

◆ isValidADT()

ilADTGroupActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 9 of file class.ilADTGroupActiveRecordBridge.php.

10  {
11  return ($a_adt instanceof ilADTGroup);
12  }

◆ prepareElements()

ilADTGroupActiveRecordBridge::prepareElements ( )
protected

Definition at line 35 of file class.ilADTGroupActiveRecordBridge.php.

References $factory, $name, ilADTActiveRecordBridge\getADT(), getElements(), and ilADTFactory\getInstance().

Referenced by getElements().

36  {
37  if (sizeof($this->elements)) {
38  return;
39  }
40 
41  $this->elements = array();
43 
44  // convert ADTs to ActiveRecord bridges
45 
46  foreach ($this->getADT()->getElements() as $name => $element) {
47  $this->elements[$name] = $factory->getActiveRecordBridgeForInstance($element);
48  $this->elements[$name]->setElementId($name);
49  }
50  }
static getInstance()
Get singleton.
if($format !==null) $name
Definition: metadata.php:230
$factory
Definition: metadata.php:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFieldValue()

ilADTGroupActiveRecordBridge::setFieldValue (   $a_field_name,
  $a_field_value 
)

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

28  {
29  // TODO: Implement setFieldValue() method.
30  }

Field Documentation

◆ $elements

ilADTGroupActiveRecordBridge::$elements = []
protected

Definition at line 7 of file class.ilADTGroupActiveRecordBridge.php.

Referenced by getElements().


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