ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTExternalLinkDBBridge Class Reference

Abstract external link db bridge. More...

+ Inheritance diagram for ilADTExternalLinkDBBridge:
+ Collaboration diagram for ilADTExternalLinkDBBridge:

Public Member Functions

 readRecord (array $a_row)
 read record More...
 
 prepareInsert (array &$a_fields)
 prepare insert More...
 
- Public Member Functions inherited from ilADTDBBridge
 __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...
 
 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)
 Prepare ADT values for update. More...
 
 afterUpdate ()
 After update hook to enable sub-tables. More...
 
 afterDelete ()
 After delete hook to enable sub-tables. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 check valid type More...
 
- Protected Member Functions inherited from ilADTDBBridge
 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 ilADTDBBridge
 $adt
 
 $table
 
 $id
 
 $primary = []
 

Detailed Description

Abstract external link db bridge.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 11 of file class.ilADTExternalLinkDBBridge.php.

Member Function Documentation

◆ isValidADT()

ilADTExternalLinkDBBridge::isValidADT ( ilADT  $a_adt)
protected

check valid type

Parameters
ilADT$a_adt
Returns
bool

Definition at line 18 of file class.ilADTExternalLinkDBBridge.php.

19  {
20  return $a_adt instanceof ilADTExternalLink;
21  }

◆ prepareInsert()

ilADTExternalLinkDBBridge::prepareInsert ( array $a_fields)

prepare insert

Parameters
array$a_fields

Definition at line 37 of file class.ilADTExternalLinkDBBridge.php.

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

38  {
39  $a_fields[$this->getElementId() . '_value'] = ["text",$this->getADT()->getUrl()];
40  $a_fields[$this->getElementId() . '_title'] = ['text',$this->getADT()->getTitle()];
41  }
getElementId()
Get element id.
+ Here is the call graph for this function:

◆ readRecord()

ilADTExternalLinkDBBridge::readRecord ( array  $a_row)

read record

Parameters
array$a_row

Definition at line 27 of file class.ilADTExternalLinkDBBridge.php.

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

28  {
29  $this->getADT()->setUrl($a_row[$this->getElementId() . '_value']);
30  $this->getADT()->setTitle($a_row[$this->getElementId() . '_title']);
31  }
getElementId()
Get element id.
+ Here is the call graph for this function:

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