ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilADTBooleanDBBridge Class Reference

Class ilADTBooleanDBBridge. More...

+ Inheritance diagram for ilADTBooleanDBBridge:
+ Collaboration diagram for ilADTBooleanDBBridge:

Public Member Functions

 readRecord (array $a_row)
 Import DB values to ADT. More...
 
 prepareInsert (array &$a_fields)
 Prepare ADT values for insert. More...
 
- Public Member Functions inherited from ilADTDBBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 
 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...
 
 getAdditionalPrimaryFields ()
 
 getPrimary ()
 Get primary fields. More...
 
 buildPrimaryWhere ()
 Convert primary keys array to sql string. More...
 
 readRecord (array $a_row)
 Import DB values to ADT. More...
 
 prepareInsert (array &$a_fields)
 Prepare ADT values for insert. More...
 
 afterInsert ()
 After insert hook to enable sub-tables. More...
 
 prepareUpdate (array &$a_fields)
 
 afterUpdate ()
 After update hook to enable sub-tables. More...
 
 afterDelete ()
 After delete hook to enable sub-tables. More...
 
 supportsDefaultValueColumn ()
 true if table storage relies on the default 'value' column More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 
- Protected Member Functions inherited from ilADTDBBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 

Additional Inherited Members

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

Detailed Description

Class ilADTBooleanDBBridge.

Definition at line 24 of file class.ilADTBooleanDBBridge.php.

Member Function Documentation

◆ isValidADT()

ilADTBooleanDBBridge::isValidADT ( ilADT  $a_adt)
protected

Reimplemented from ilADTDBBridge.

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

26 : bool
27 {
28 return ($a_adt instanceof ilADTBoolean);
29 }

◆ prepareInsert()

ilADTBooleanDBBridge::prepareInsert ( array &  $a_fields)

Prepare ADT values for insert.

Parameters
array&$a_fields

Reimplemented from ilADTDBBridge.

Definition at line 38 of file class.ilADTBooleanDBBridge.php.

38 : void
39 {
40 $a_fields[$this->getElementId()] = array("integer", $this->getADT()->getStatus());
41 }
getElementId()
Get element id.

References ilADTDBBridge\getADT(), and ilADTDBBridge\getElementId().

+ Here is the call graph for this function:

◆ readRecord()

ilADTBooleanDBBridge::readRecord ( array  $a_row)

Import DB values to ADT.

Parameters
array$a_row

Reimplemented from ilADTDBBridge.

Definition at line 33 of file class.ilADTBooleanDBBridge.php.

33 : void
34 {
35 $this->getADT()->setStatus($a_row[$this->getElementId()]);
36 }

References ilADTDBBridge\getADT(), and ilADTDBBridge\getElementId().

+ Here is the call graph for this function:

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