ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilADTTextActiveRecordBridge Class Reference
+ Inheritance diagram for ilADTTextActiveRecordBridge:
+ Collaboration diagram for ilADTTextActiveRecordBridge:

Public Member Functions

 getActiveRecordFields ()
 Convert ADT to active record fields.
 getFieldValue ($a_field_name)
 Get field value.
 setFieldValue ($a_field_name, $a_field_value)
 Set field value.
- Public Member Functions inherited from ilADTActiveRecordBridge
 __construct (ilADT $a_adt)
 Constructor.
 getADT ()
 Get ADT.
 setTable ($a_table)
 Set table name.
 getTable ()
 Get table name.
 setElementId ($a_value)
 Set element id (aka DB column[s] [prefix])
 getElementId ()
 Get element id.
 setPrimary (array $a_value)
 Set primary fields (in MDB2 format)
 getPrimary ()
 Get primary fields.

Protected Member Functions

 isValidADT (ilADT $a_adt)
 Check if given ADT is valid.
- Protected Member Functions inherited from ilADTActiveRecordBridge
 setADT (ilADT $a_adt)
 Set ADT.

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

ilADTTextActiveRecordBridge::getActiveRecordFields ( )

Convert ADT to active record fields.

Returns
array

Reimplemented from ilADTActiveRecordBridge.

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

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

{
$def = $this->getADT()->getCopyOfDefinition();
$field = new arField();
$field->setHasField(true);
$field->setNotNull(!$def->isNullAllowed());
$field->setFieldType(arField::FIELD_TYPE_TEXT);
$field->setName($this->getElementId());
$max = $def->getMaxLength();
if($max !== null)
{
$field->setLength($max);
}
return array($field);
}

+ Here is the call graph for this function:

ilADTTextActiveRecordBridge::getFieldValue (   $a_field_name)

Get field value.

Parameters
string$a_field_name
Returns
mixed

Reimplemented from ilADTActiveRecordBridge.

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

References ilADTActiveRecordBridge\getADT().

{
return $this->getADT()->getText();
}

+ Here is the call graph for this function:

ilADTTextActiveRecordBridge::isValidADT ( ilADT  $a_adt)
protected

Check if given ADT is valid.

:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?

Parameters
ilADT$a_adt

Reimplemented from ilADTActiveRecordBridge.

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

{
return ($a_adt instanceof ilADTText);
}
ilADTTextActiveRecordBridge::setFieldValue (   $a_field_name,
  $a_field_value 
)

Set field value.

Parameters
string$a_field_name
mixed$a_field_value

Reimplemented from ilADTActiveRecordBridge.

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

References ilADTActiveRecordBridge\getADT().

{
return $this->getADT()->setText($a_field_value);
}

+ Here is the call graph for this function:


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