ILIAS  release_8 Revision v8.24
ilObjFileStakeholder Class Reference

Class ilObjFileStakeholder. More...

+ Inheritance diagram for ilObjFileStakeholder:
+ Collaboration diagram for ilObjFileStakeholder:

Public Member Functions

 __construct (int $owner=6)
 ilObjFileStakeholder constructor. More...
 
 getId ()
 @inheritDoc More...
 
 getOwnerOfNewResources ()
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 isResourceInUse (ResourceIdentification $identification)
 @inheritDoc More...
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 @inheritDoc More...
 
 getOwnerOfResource (ResourceIdentification $identification)
 @inheritDoc More...
 
 getConsumerNameForPresentation ()
 @inheritDoc More...
 
 getId ()
 
 getConsumerNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 isResourceInUse (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getOwnerOfResource (ResourceIdentification $identification)
 
 getOwnerOfNewResources ()
 

Protected Attributes

int $owner = 6
 
ilDBInterface $database
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjFileStakeholder::__construct ( int  $owner = 6)

ilObjFileStakeholder constructor.

Definition at line 33 of file class.ilObjFileStakeholder.php.

34 {
35 $this->owner = $owner;
36 }

References $owner.

Member Function Documentation

◆ getId()

ilObjFileStakeholder::getId ( )

@inheritDoc

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 41 of file class.ilObjFileStakeholder.php.

41 : string
42 {
43 return 'file_obj';
44 }

◆ getOwnerOfNewResources()

ilObjFileStakeholder::getOwnerOfNewResources ( )

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 46 of file class.ilObjFileStakeholder.php.

46 : int
47 {
48 return $this->owner;
49 }

References $owner.

◆ resourceHasBeenDeleted()

ilObjFileStakeholder::resourceHasBeenDeleted ( ResourceIdentification  $identification)

@inheritDoc

Reimplemented from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder.

Definition at line 51 of file class.ilObjFileStakeholder.php.

51 : 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 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
global $DIC
Definition: feed.php:28

References $d, $DIC, and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().

+ Here is the call graph for this function:

Field Documentation

◆ $database

ilDBInterface ilObjFileStakeholder::$database
protected

Definition at line 28 of file class.ilObjFileStakeholder.php.

◆ $owner

int ilObjFileStakeholder::$owner = 6
protected

Definition at line 27 of file class.ilObjFileStakeholder.php.

Referenced by __construct(), and getOwnerOfNewResources().


The documentation for this class was generated from the following file: