ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilDataCollectionReferenceField Class Reference

Class ilDataCollectionField. More...

+ Inheritance diagram for ilDataCollectionReferenceField:
+ Collaboration diagram for ilDataCollectionReferenceField:

Public Member Functions

 __construct (ilDataCollectionRecord $record, ilDataCollectionField $field)
 
 getExportValue ()
 
- Public Member Functions inherited from ilDataCollectionRecordField
 __construct (ilDataCollectionRecord $record, ilDataCollectionField $field)
 
 doUpdate ()
 Update object in database. More...
 
 delete ()
 Delete record field in database. More...
 
 getValue ()
 
 setValue ($value, $omit_parsing=false)
 Set value for record field. More...
 
 getFormInput ()
 
 getExportValue ()
 
 getPlainText ()
 
 getHTML ($link=true)
 
 getSortingValue ($link=true)
 
 getSingleHTML ()
 
 getField ()
 
 getId ()
 
 getRecord ()
 

Protected Member Functions

 getLinkHTML ($link_name=NULL, $value)
 
- Protected Member Functions inherited from ilDataCollectionRecordField
 doRead ()
 Read object data from database. More...
 
 doCreate ()
 Create object in database. More...
 
 loadValue ()
 Load the value. More...
 

Protected Attributes

 $dcl_obj_id
 
 $properties = array()
 
- Protected Attributes inherited from ilDataCollectionRecordField
 $id
 
 $field
 
 $record
 
 $value
 
 $lng
 
 $user
 
 $ctrl
 
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionReferenceField::__construct ( ilDataCollectionRecord  $record,
ilDataCollectionField  $field 
)
Parameters
ilDataCollectionRecord$record
ilDataCollectionField$field

Reimplemented from ilDataCollectionRecordField.

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

38 {
39 parent::__construct($record, $field);
40 $dclTable = ilDataCollectionCache::getTableCache($this->getField()->getTableId());
41 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
42 $this->properties = $this->field->getProperties();
43 }

References ilDataCollectionRecordField\$field, ilDataCollectionRecordField\$record, ilDataCollectionRecordField\getField(), and ilDataCollectionCache\getTableCache().

+ Here is the call graph for this function:

Member Function Documentation

◆ getExportValue()

ilDataCollectionReferenceField::getExportValue ( )
Returns
int|string

Reimplemented from ilDataCollectionRecordField.

Reimplemented in ilDataCollectionNReferenceField.

Definition at line 115 of file class.ilDataCollectionReferenceField.php.

115 {
116 if ($this->getValue()) {
118
119 return $ref_rec->getRecordField($this->getField()->getFieldRef())->getExportValue();
120 } else {
121 return "";
122 }
123 }
static getRecordCache($record_id=0)

References ilDataCollectionRecordField\getField(), ilDataCollectionCache\getRecordCache(), and ilDataCollectionRecordField\getValue().

+ Here is the call graph for this function:

◆ getLinkHTML()

ilDataCollectionReferenceField::getLinkHTML (   $link_name = NULL,
  $value 
)
protected
Parameters
null$link_name
$value
Returns
string

Reimplemented in ilDataCollectionNReferenceField.

Definition at line 93 of file class.ilDataCollectionReferenceField.php.

93 {
94 global $ilCtrl;
95
96 if (!$value || $value == "-") {
97 return "";
98 }
99 $record_field = $this;
101 if (!$link_name) {
102 $link_name = $ref_record->getRecordFieldHTML($record_field->getField()->getFieldRef());
103 }
104 $ilCtrl->setParameterByClass("ildatacollectionrecordviewgui", "record_id", $ref_record->getId());
105 $html = "<a href='" . $ilCtrl->getLinkTargetByClass("ilDataCollectionRecordViewGUI", "renderRecord") . "&disable_paging=1'>" . $link_name
106 . "</a>";
107
108 return $html;
109 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, ilDataCollectionRecordField\$value, and ilDataCollectionCache\getRecordCache().

+ Here is the call graph for this function:

Field Documentation

◆ $dcl_obj_id

ilDataCollectionReferenceField::$dcl_obj_id
protected

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

◆ $properties

ilDataCollectionReferenceField::$properties = array()
protected

Definition at line 31 of file class.ilDataCollectionReferenceField.php.


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