ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilADTTextActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTTextActiveRecordBridge:
+ Collaboration diagram for ilADTTextActiveRecordBridge:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from ilADTActiveRecordBridge
 $adt
 
 $id
 
 $tabe
 
 $primary
 

Detailed Description

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

Member Function Documentation

◆ getActiveRecordFields()

ilADTTextActiveRecordBridge::getActiveRecordFields ( )

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

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

17  {
18  $def = $this->getADT()->getCopyOfDefinition();
19 
20  $field = new arField();
21  $field->setHasField(true);
22  $field->setNotNull(!$def->isNullAllowed());
23  $field->setFieldType(arField::FIELD_TYPE_TEXT);
24  $field->setName($this->getElementId());
25 
26  $max = $def->getMaxLength();
27  if($max !== null)
28  {
29  $field->setLength($max);
30  }
31 
32  return array($field);
33  }
Class arField.
const FIELD_TYPE_TEXT
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getFieldValue()

ilADTTextActiveRecordBridge::getFieldValue (   $a_field_name)

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

References ilADTActiveRecordBridge\getADT().

36  {
37  return $this->getADT()->getText();
38  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTTextActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

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

8  {
9  return ($a_adt instanceof ilADTText);
10  }

◆ setFieldValue()

ilADTTextActiveRecordBridge::setFieldValue (   $a_field_name,
  $a_field_value 
)

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

References ilADTActiveRecordBridge\getADT().

41  {
42  return $this->getADT()->setText($a_field_value);
43  }
+ Here is the call graph for this function:

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