ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilADTGroupActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTGroupActiveRecordBridge:
+ Collaboration diagram for ilADTGroupActiveRecordBridge:

Public Member Functions

 getFieldValue (string $a_field_name)
 
 setFieldValue (string $a_field_name, $a_field_value)
 
 getElements ()
 
 getElement (string $a_element_id)
 
 getActiveRecordFields ()
 
- Public Member Functions inherited from ilADTActiveRecordBridge
 __construct (ilADT $a_adt)
 
 getADT ()
 Get ADT. More...
 
 setTable (string $a_table)
 
 getTable ()
 
 setElementId (string $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 (string $a_field_name)
 Get field value. More...
 
 setFieldValue (string $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)
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 

Protected Attributes

array $elements = []
 
- Protected Attributes inherited from ilADTActiveRecordBridge
ilADT $adt
 
string $id
 
string $table
 
array $primary = []
 

Detailed Description

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

Member Function Documentation

◆ getActiveRecordFields()

ilADTGroupActiveRecordBridge::getActiveRecordFields ( )

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

References getElements().

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

◆ getElement()

ilADTGroupActiveRecordBridge::getElement ( string  $a_element_id)

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

References getElements().

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

◆ getElements()

ilADTGroupActiveRecordBridge::getElements ( )

Definition at line 51 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 ( string  $a_field_name)

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

21  {
22  return '';
23  }

◆ isValidADT()

ilADTGroupActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

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

12  : bool
13  {
14  return ($a_adt instanceof ilADTGroup);
15  }

◆ prepareElements()

ilADTGroupActiveRecordBridge::prepareElements ( )
protected

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

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

Referenced by getElements().

34  : void
35  {
36  if (count($this->elements)) {
37  return;
38  }
39 
40  $this->elements = array();
42 
43  // convert ADTs to ActiveRecord bridges
44 
45  foreach ($this->getADT()->getElements() as $name => $element) {
46  $this->elements[$name] = $factory->getActiveRecordBridgeForInstance($element);
47  $this->elements[$name]->setElementId($name);
48  }
49  }
if($format !==null) $name
Definition: metadata.php:247
$factory
Definition: metadata.php:75
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFieldValue()

ilADTGroupActiveRecordBridge::setFieldValue ( string  $a_field_name,
  $a_field_value 
)

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

28  : void
29  {
30  }

Field Documentation

◆ $elements

array ilADTGroupActiveRecordBridge::$elements = []
protected

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

Referenced by getElements().


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