ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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

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

References $ilDB, $query, ilDataCollectionRecordField\$value, ilDataCollectionRecordField\getField(), ilDataCollectionRecordField\getHTML(), getLinkHTML(), ilDataCollectionCache\getRecordCache(), ilDataCollectionCache\getTableCache(), ilDataCollectionRecordField\getValue(), and ilDataCollectionField\PROPERTYID_REFERENCE_LINK.

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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getExportValue()

ilDataCollectionReferenceField::getExportValue ( )
Returns
int|string

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

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

115  {
116  if ($this->getValue()) {
117  $ref_rec = ilDataCollectionCache::getRecordCache($this->getValue());
118 
119  return $ref_rec->getRecordField($this->getField()->getFieldRef())->getExportValue();
120  } else {
121  return "";
122  }
123  }
static getRecordCache($record_id=0)
+ Here is the call graph for this function:

◆ getLinkHTML()

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

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

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

Referenced by __construct().

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  }
static getRecordCache($record_id=0)
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller 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: