ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDclIliasReferenceRecordFieldModel Class Reference

Class ilDclIliasReferenceRecordFieldModel. More...

+ Inheritance diagram for ilDclIliasReferenceRecordFieldModel:
+ Collaboration diagram for ilDclIliasReferenceRecordFieldModel:

Public Member Functions

 __construct (ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
 
 getStatus ()
 
 getValueForRepresentation ()
 
 getExportValue ()
 
- Public Member Functions inherited from ilDclBaseRecordFieldModel
 __construct (ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
 
 doCreate ()
 Creates an Id and a database entry. More...
 
 doUpdate ()
 Update object in database. More...
 
 delete ()
 Delete record field in database. More...
 
 getValue ()
 
 getValueForRepresentation ()
 
 serializeData ($value)
 Serialize data before storing to db. More...
 
 deserializeData ($value)
 Deserialize data before applying to field. More...
 
 setValue ($value, $omit_parsing=false)
 Set value for record field. More...
 
 setValueFromForm ($form)
 
 getFormulaValue ()
 
 parseExportValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getValueFromExcel ($excel, $row, $col)
 
 parseValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getExportValue ()
 
 fillExcelExport (ilExcel $worksheet, &$row, &$col)
 
 getPlainText ()
 
 getSortingValue ($link=true)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI &$confirmation)
 
 parseSortingValue ($value, $link=true)
 Returns sortable value for the specific field-types. More...
 
 cloneStructure (ilDclBaseRecordFieldModel $old_record_field)
 
 afterClone ()
 
 getField ()
 
 getId ()
 
 getRecord ()
 
 getRecordRepresentation ()
 
 setRecordRepresentation ($record_representation)
 
 getFieldRepresentation ()
 
 setFieldRepresentation ($field_representation)
 

Protected Attributes

 $dcl_obj_id
 
- Protected Attributes inherited from ilDclBaseRecordFieldModel
 $id
 
 $field
 
 $record
 
 $record_representation
 
 $field_representation
 
 $value
 
 $user
 
 $ctrl
 
 $db
 
 $lng
 

Additional Inherited Members

- Protected Member Functions inherited from ilDclBaseRecordFieldModel
 doRead ()
 Read object data from database. More...
 
 loadValue ()
 Load the value. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDclIliasReferenceRecordFieldModel::__construct ( ilDclBaseRecordModel  $record,
ilDclBaseFieldModel  $field 
)

Definition at line 28 of file class.ilDclIliasReferenceRecordFieldModel.php.

References ilDclBaseRecordFieldModel\getField(), and ilDclCache\getTableCache().

29  {
30  parent::__construct($record, $field);
31 
32  $dclTable = ilDclCache::getTableCache($this->getField()->getTableId());
33  $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
34  }
static getTableCache($table_id=0)
+ Here is the call graph for this function:

Member Function Documentation

◆ getExportValue()

ilDclIliasReferenceRecordFieldModel::getExportValue ( )
Returns
int|string

Definition at line 69 of file class.ilDclIliasReferenceRecordFieldModel.php.

References ilLink\_getStaticLink(), and ilDclBaseRecordFieldModel\getValue().

70  {
71  $link = ilLink::_getStaticLink($this->getValue());
72 
73  return $link;
74  }
+ Here is the call graph for this function:

◆ getStatus()

ilDclIliasReferenceRecordFieldModel::getStatus ( )

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

References $DIC, $ilDB, $ilUser, $query, $result, ilObject2\_lookupObjectId(), ilDBConstants\FETCHMODE_OBJECT, and ilDclBaseRecordFieldModel\getValue().

38  {
39  global $DIC;
40  $ilDB = $DIC['ilDB'];
41  $ilUser = $DIC['ilUser'];
42  $usr_id = $ilUser->getId();
43  $obj_ref = $this->getValue();
44  $obj_id = ilObject2::_lookupObjectId($obj_ref);
45  $query
46  = " SELECT status_changed, status
47  FROM ut_lp_marks
48  WHERE usr_id = " . $usr_id . " AND obj_id = " . $obj_id;
49  $result = $ilDB->query($query);
50 
51  return ($result->numRows() == 0) ? false : $result->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
52  }
$result
global $DIC
Definition: saml.php:7
static _lookupObjectId($a_ref_id)
$ilUser
Definition: imgupload.php:18
$query
global $ilDB
+ Here is the call graph for this function:

◆ getValueForRepresentation()

ilDclIliasReferenceRecordFieldModel::getValueForRepresentation ( )

Definition at line 58 of file class.ilDclIliasReferenceRecordFieldModel.php.

References ilObject2\_lookupObjectId(), ilObject2\_lookupTitle(), and ilDclBaseRecordFieldModel\getValue().

59  {
60  $ref_id = $this->getValue();
61 
62  return ilObject2::_lookupTitle(ilObject2::_lookupObjectId($ref_id)) . ' [' . $ref_id . ']';
63  }
static _lookupTitle($a_id)
static _lookupObjectId($a_ref_id)
+ Here is the call graph for this function:

Field Documentation

◆ $dcl_obj_id

ilDclIliasReferenceRecordFieldModel::$dcl_obj_id
protected

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