ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilDclIliasReferenceRecordFieldModel.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  protected int $dcl_obj_id;
24 
26  {
27  parent::__construct($record, $field);
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 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _lookupObjectId(int $ref_id)
static getTableCache(?int $table_id=null)
__construct(Container $dic, ilPlugin $plugin)
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)