ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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
 doUpdate ()
 Update object in database.
 delete ()
 Delete record field in database.
 getValue ()
 setValue ($value, $omit_parsing=false)
 Set value for record field.
 getFormInput ()
 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.
 doCreate ()
 Create object in database.
 loadValue ()
 Load the value.

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

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

Reimplemented from ilDataCollectionRecordField.

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

References ilDataCollectionRecordField\getField(), and ilDataCollectionCache\getTableCache().

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

+ Here is the call graph for this function:

Member Function Documentation

ilDataCollectionReferenceField::getExportValue ( )
Returns
int|string

Reimplemented from ilDataCollectionRecordField.

Reimplemented in ilDataCollectionNReferenceField.

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

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

{
if ($this->getValue()) {
return $ref_rec->getRecordField($this->getField()->getFieldRef())->getExportValue();
} else {
return "";
}
}

+ Here is the call graph for this function:

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.

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

{
global $ilCtrl;
if (!$value || $value == "-") {
return "";
}
$record_field = $this;
if (!$link_name) {
$link_name = $ref_record->getRecordFieldHTML($record_field->getField()->getFieldRef());
}
$ilCtrl->setParameterByClass("ildatacollectionrecordviewgui", "record_id", $ref_record->getId());
$html = "<a href='" . $ilCtrl->getLinkTargetByClass("ilDataCollectionRecordViewGUI", "renderRecord") . "&disable_paging=1'>" . $link_name
. "</a>";
return $html;
}

+ Here is the call graph for this function:

Field Documentation

ilDataCollectionReferenceField::$dcl_obj_id
protected

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

ilDataCollectionReferenceField::$properties = array()
protected

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


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