37 $this->current_user = (
int) ($DIC->isDependencyAvailable(
'user') ? $DIC->user()->getId() : 13);
58 if ($object_id === null) {
64 if ($DIC->access()->checkAccessOfUser($this->current_user,
'read',
'', $ref_id)) {
75 $r = $this->database->queryF(
76 "SELECT file_id FROM file_data WHERE rid = %s",
80 $d = $this->database->fetchObject(
$r);
82 return (isset(
$d->file_id) ? (
int)
$d->file_id : null);
89 $this->database->manipulateF(
90 "UPDATE object_data SET offline = 1 WHERE obj_id = %s",
103 $r = $this->database->queryF(
104 "SELECT file_id FROM file_data WHERE rid = %s",
108 $d = $this->database->fetchObject(
$r);
109 if (
$d !== null && property_exists(
$d,
'file_id') &&
$d->file_id !== null) {
111 $ref_id = array_shift($references);
113 return ilLink::_getLink(
$ref_id,
'file');
121 $this->database = $DIC->database();
canBeAccessedByCurrentUser(ResourceIdentification $identification)
getLocationURIForResourceUsage(ResourceIdentification $identification)
Class ilObjFileStakeholder.
static _getAllReferences(int $id)
get all reference ids for object ID
resourceHasBeenDeleted(ResourceIdentification $identification)
resolveObjectId(ResourceIdentification $identification)
Class ResourceIdentification.
__construct(protected int $owner=6)
ilObjFileStakeholder constructor.