ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclIliasReferenceRecordFieldModel Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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, bool $omit_parsing=false)
 Set value for record field. More...
 
 setValueFromForm (ilPropertyFormGUI $form)
 
 getFormulaValue ()
 
 parseExportValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getValueFromExcel (ilExcel $excel, int $row, int $col)
 
 parseValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getExportValue ()
 
 fillExcelExport (ilExcel $worksheet, int &$row, int &$col)
 
 getPlainText ()
 
 getSortingValue (bool $link=true)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI $confirmation)
 
 parseSortingValue ($value, bool $link=true)
 Returns sortable value for the specific field-types. More...
 
 cloneStructure (ilDclBaseRecordFieldModel $old_record_field)
 
 afterClone ()
 
 getField ()
 
 getId ()
 
 getRecord ()
 
 getRecordRepresentation ()
 
 setRecordRepresentation (ilDclBaseRecordRepresentation $record_representation)
 
 getFieldRepresentation ()
 
 setFieldRepresentation (ilDclBaseFieldRepresentation $field_representation)
 

Protected Attributes

int $dcl_obj_id
 
- Protected Attributes inherited from ilDclBaseRecordFieldModel
int $id = null
 
ilDclBaseFieldModel $field
 
ilDclBaseRecordModel $record
 
ilDclBaseRecordRepresentation $record_representation = null
 
ilDclBaseFieldRepresentation $field_representation = null
 
 $value
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilDBInterface $db
 
ilLanguage $lng
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 

Additional Inherited Members

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References ILIAS\GlobalScreen\Provider\__construct(), ilDclBaseRecordFieldModel\getField(), and ilDclCache\getTableCache().

24  {
25  parent::__construct($record, $field);
26 
27  $dclTable = ilDclCache::getTableCache($this->getField()->getTableId());
28  $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
29  }
static getTableCache(int $table_id=null)
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getExportValue()

ilDclIliasReferenceRecordFieldModel::getExportValue ( )

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

References ilDclBaseRecordFieldModel\$value, ilLink\_getStaticLink(), ilDclBaseRecordFieldModel\getValue(), and ILIAS\Repository\int().

65  : string
66  {
67  $value = (int) $this->getValue();
68  if ($value <= 0) {
69  return '';
70  }
72  }
+ Here is the call graph for this function:

◆ getStatus()

ilDclIliasReferenceRecordFieldModel::getStatus ( )
Returns
false|object

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

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

35  {
36  global $DIC;
37  $ilDB = $DIC['ilDB'];
38  $ilUser = $DIC['ilUser'];
39  $obj_ref = $this->getValue();
40  if (!$obj_ref) {
41  return false;
42  }
43  $usr_id = $ilUser->getId();
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  }
global $DIC
Definition: feed.php:28
static _lookupObjectId(int $ref_id)
$query
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ getValueForRepresentation()

ilDclIliasReferenceRecordFieldModel::getValueForRepresentation ( )

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

References $ref_id, ilObject\_lookupObjectId(), ilObject\_lookupTitle(), and ilDclBaseRecordFieldModel\getValue().

54  : string
55  {
56  $ref_id = $this->getValue();
57 
58  if ($ref_id) {
60  } else {
61  return "";
62  }
63  }
$ref_id
Definition: ltiauth.php:67
static _lookupTitle(int $obj_id)
static _lookupObjectId(int $ref_id)
+ Here is the call graph for this function:

Field Documentation

◆ $dcl_obj_id

int ilDclIliasReferenceRecordFieldModel::$dcl_obj_id
protected

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