ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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)
 
 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 65 of file class.ilDclIliasReferenceRecordFieldModel.php.

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

66  {
67  $link = ilLink::_getStaticLink($this->getValue());
68  return $link;
69  }
+ Here is the call graph for this function:

◆ getStatus()

ilDclIliasReferenceRecordFieldModel::getStatus ( )

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

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

37  {
38  global $DIC;
39  $ilDB = $DIC['ilDB'];
40  $ilUser = $DIC['ilUser'];
41  $usr_id = $ilUser->getId();
42  $obj_ref = $this->getValue();
43  $obj_id = ilObject2::_lookupObjectId($obj_ref);
44  $query = " SELECT status_changed, status
45  FROM ut_lp_marks
46  WHERE usr_id = " . $usr_id . " AND obj_id = " . $obj_id;
47  $result = $ilDB->query($query);
48  return ($result->numRows() == 0)? false : $result->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
49  }
$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 55 of file class.ilDclIliasReferenceRecordFieldModel.php.

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

56  {
57  $ref_id = $this->getValue();
58  return ilObject2::_lookupTitle(ilObject2::_lookupObjectId($ref_id)) . ' [' . $ref_id . ']';
59  }
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: