ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjBibliographicStakeholder.php
Go to the documentation of this file.
1<?php
2
21
27{
28 protected ?ilDBInterface $database = null;
29
33 public function getId(): string
34 {
35 return 'bibl';
36 }
37
38 public function getOwnerOfNewResources(): int
39 {
41 }
42
43 public function getLocationURIForResourceUsage(ResourceIdentification $identification): ?string
44 {
45 $this->initDB();
46
47 $r = $this->database->query(
48 "SELECT id FROM il_bibl_data WHERE rid = " . $this->database->quote($identification->serialize(), 'text')
49 );
50 $d = $this->database->fetchObject($r);
51 if (isset($d->id)) {
52 $references = ilObject::_getAllReferences($d->id);
53 $ref_id = array_shift($references);
54
55 return ilLink::_getLink($ref_id, 'bibl');
56 }
57 return null;
58 }
59
60 private function initDB(): void
61 {
62 global $DIC;
63 $this->database = $DIC->database();
64 }
65}
Class ilObjBibliographicStakeholder.
getLocationURIForResourceUsage(ResourceIdentification $identification)
static _getAllReferences(int $id)
get all reference ids for object ID
Interface ilDBInterface.
$ref_id
Definition: ltiauth.php:66
global $DIC
Definition: shib_login.php:26