ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilADTTextActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTTextActiveRecordBridge:
+ Collaboration diagram for ilADTTextActiveRecordBridge:

Public Member Functions

 getActiveRecordFields ()
 
 getFieldValue (string $a_field_name)
 
 setFieldValue (string $a_field_name, $a_field_value)
 
- 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)
 
- Protected Member Functions inherited from ilADTActiveRecordBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file class.ilADTTextActiveRecordBridge.php.

Member Function Documentation

◆ getActiveRecordFields()

ilADTTextActiveRecordBridge::getActiveRecordFields ( )

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

References arField\FIELD_TYPE_TEXT, ilADTActiveRecordBridge\getADT(), ilADTActiveRecordBridge\getElementId(), and null.

28  : array
29  {
30  $def = $this->getADT()->getCopyOfDefinition();
31 
32  $field = new arField();
33  $field->setHasField(true);
34  $field->setNotNull(!$def->isNullAllowed());
35  $field->setFieldType(arField::FIELD_TYPE_TEXT);
36  $field->setName($this->getElementId());
37 
38  $max = $def->getMaxLength();
39  if ($max !== null) {
40  $field->setLength($max);
41  }
42 
43  return array($field);
44  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const FIELD_TYPE_TEXT
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getFieldValue()

ilADTTextActiveRecordBridge::getFieldValue ( string  $a_field_name)

Definition at line 46 of file class.ilADTTextActiveRecordBridge.php.

References ilADTActiveRecordBridge\getADT().

47  {
48  return $this->getADT()->getText();
49  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTTextActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 23 of file class.ilADTTextActiveRecordBridge.php.

23  : bool
24  {
25  return ($a_adt instanceof ilADTText);
26  }

◆ setFieldValue()

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

Definition at line 51 of file class.ilADTTextActiveRecordBridge.php.

References ilADTActiveRecordBridge\getADT().

51  : void
52  {
53  $this->getADT()->setText($a_field_value);
54  }
+ Here is the call graph for this function:

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