ILIAS  release_8 Revision v8.24
class.ilObjFileStakeholder.php
Go to the documentation of this file.
1<?php
20
26{
27 protected int $owner = 6;
29
33 public function __construct(int $owner = 6)
34 {
35 $this->owner = $owner;
36 }
37
41 public function getId(): string
42 {
43 return 'file_obj';
44 }
45
46 public function getOwnerOfNewResources(): int
47 {
48 return $this->owner;
49 }
50
51 public function resourceHasBeenDeleted(ResourceIdentification $identification): bool
52 {
53 global $DIC;
54 $this->database = $DIC->database();
55 $r = $this->database->queryF(
56 "SELECT file_id FROM file_data WHERE rid = %s",
57 ['text'],
58 [$identification->serialize()]
59 );
60 $d = $this->database->fetchObject($r);
61 if (isset($d->file_id)) {
62 try {
63 $this->database->manipulateF(
64 "UPDATE object_data SET offline = 1 WHERE obj_id = %s",
65 ['text'],
66 [$d->file_id]
67 );
68 } catch (Throwable $t) {
69 return false;
70 }
71 return true;
72 }
73 return false;
74 }
75}
Class ilObjFileStakeholder.
__construct(int $owner=6)
ilObjFileStakeholder constructor.
resourceHasBeenDeleted(ResourceIdentification $identification)
@inheritDoc
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
global $DIC
Definition: feed.php:28
Interface ilDBInterface.