ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 21 of file class.ilADTGroupActiveRecordBridge.php.

Member Function Documentation

◆ getActiveRecordFields()

ilADTGroupActiveRecordBridge::getActiveRecordFields ( )

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

References getElements().

81  : array
82  {
83  $fields = array();
84  foreach ($this->getElements() as $element_id => $element) {
85  $element_fields = $element->getActiveRecordFields();
86  if ($element_fields) {
87  $fields[$element_id] = $element_fields;
88  }
89  }
90  return $fields;
91  }
+ Here is the call graph for this function:

◆ getElement()

ilADTGroupActiveRecordBridge::getElement ( string  $a_element_id)

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

References getElements(), and null.

74  {
75  if (array_key_exists($a_element_id, $this->getElements())) {
76  return $this->elements[$a_element_id];
77  }
78  return null;
79  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getElements()

ilADTGroupActiveRecordBridge::getElements ( )

Definition at line 67 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 36 of file class.ilADTGroupActiveRecordBridge.php.

37  {
38  return '';
39  }

◆ isValidADT()

ilADTGroupActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

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

28  : bool
29  {
30  return ($a_adt instanceof ilADTGroup);
31  }

◆ prepareElements()

ilADTGroupActiveRecordBridge::prepareElements ( )
protected

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

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

Referenced by getElements().

50  : void
51  {
52  if (count($this->elements)) {
53  return;
54  }
55 
56  $this->elements = array();
57  $factory = ilADTFactory::getInstance();
58 
59  // convert ADTs to ActiveRecord bridges
60 
61  foreach ($this->getADT()->getElements() as $name => $element) {
62  $this->elements[$name] = $factory->getActiveRecordBridgeForInstance($element);
63  $this->elements[$name]->setElementId($name);
64  }
65  }
+ 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 44 of file class.ilADTGroupActiveRecordBridge.php.

44  : void
45  {
46  }

Field Documentation

◆ $elements

array ilADTGroupActiveRecordBridge::$elements = []
protected

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

Referenced by getElements().


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