ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTGroupActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTGroupActiveRecordBridge:
+ Collaboration diagram for ilADTGroupActiveRecordBridge:

Public Member Functions

 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 51 of file class.ilADTGroupActiveRecordBridge.php.

References array, and getElements().

52  {
53  $fields = array();
54  foreach ($this->getElements() as $element_id => $element) {
55  $element_fields = $element->getActiveRecordFields();
56  if ($element_fields) {
57  $fields[$element_id] = $element_fields;
58  }
59  }
60  return $fields;
61  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getElement()

ilADTGroupActiveRecordBridge::getElement (   $a_element_id)

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

References getElements().

41  {
42  if (array_key_exists($a_element_id, $this->getElements())) {
43  return $this->elements[$a_element_id];
44  }
45  }
+ Here is the call graph for this function:

◆ getElements()

ilADTGroupActiveRecordBridge::getElements ( )

Definition at line 34 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:

◆ 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 17 of file class.ilADTGroupActiveRecordBridge.php.

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

Referenced by getElements().

18  {
19  if (sizeof($this->elements)) {
20  return;
21  }
22 
23  $this->elements = array();
25 
26  // convert ADTs to ActiveRecord bridges
27 
28  foreach ($this->getADT()->getElements() as $name => $element) {
29  $this->elements[$name] = $factory->getActiveRecordBridgeForInstance($element);
30  $this->elements[$name]->setElementId($name);
31  }
32  }
$factory
Definition: metadata.php:47
static getInstance()
Get singleton.
if($format !==null) $name
Definition: metadata.php:146
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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: