ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclIliasReferenceRecordFieldModel.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected int $dcl_obj_id;
24
26 {
28
29 $dclTable = ilDclCache::getTableCache($this->getField()->getTableId());
30 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
31 }
32
33 public function getStatus(): ?stdClass
34 {
35 $obj_ref = $this->getValue();
36 if (!$obj_ref) {
37 return null;
38 }
39 $usr_id = $this->user->getId();
40 $obj_id = ilObject2::_lookupObjectId($obj_ref);
41 $query = " SELECT status_changed, status
42 FROM ut_lp_marks
43 WHERE usr_id = " . $usr_id . " AND obj_id = " . $obj_id;
44
45 return $this->db->fetchObject($this->db->query($query));
46 }
47
48 public function getExportValue(): string
49 {
50 $value = (int) $this->getValue();
51 if ($value <= 0) {
52 return '';
53 }
55 }
56}
static getTableCache(?int $table_id=null)
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
static _lookupObjectId(int $ref_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc