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

References array, and getElements().

55  {
56  $fields = array();
57  foreach($this->getElements() as $element_id => $element)
58  {
59  $element_fields = $element->getActiveRecordFields();
60  if($element_fields)
61  {
62  $fields[$element_id] = $element_fields;
63  }
64  }
65  return $fields;
66  }
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 42 of file class.ilADTGroupActiveRecordBridge.php.

References getElements().

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

◆ getElements()

ilADTGroupActiveRecordBridge::getElements ( )

Definition at line 36 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 array, ilADTActiveRecordBridge\getADT(), getElements(), and ilADTFactory\getInstance().

Referenced by getElements().

18  {
19  if(sizeof($this->elements))
20  {
21  return;
22  }
23 
24  $this->elements = array();
25  $factory = ilADTFactory::getInstance();
26 
27  // convert ADTs to ActiveRecord bridges
28 
29  foreach($this->getADT()->getElements() as $name => $element)
30  {
31  $this->elements[$name] = $factory->getActiveRecordBridgeForInstance($element);
32  $this->elements[$name]->setElementId($name);
33  }
34  }
static getInstance()
Get singleton.
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: