ILIAS  release_7 Revision v7.30-3-g800a261c036
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

 $owner = 6
 
 $database
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjFileStakeholder::__construct ( int  $owner = 6)

ilObjFileStakeholder constructor.

Parameters
int$owner

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

24 {
25 global $DIC;
26 $this->owner = $owner;
27 $this->database = $DIC->database();
28 }
global $DIC
Definition: goto.php:24

References $DIC, and $owner.

Member Function Documentation

◆ getId()

ilObjFileStakeholder::getId ( )

@inheritDoc

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

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

33 : string
34 {
35 return 'file_obj';
36 }

◆ getOwnerOfNewResources()

ilObjFileStakeholder::getOwnerOfNewResources ( )
Returns
int

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

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

38 : int
39 {
40 return $this->owner;
41 }

References $owner.

◆ resourceHasBeenDeleted()

ilObjFileStakeholder::resourceHasBeenDeleted ( ResourceIdentification  $identification)

@inheritDoc

Reimplemented from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder.

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

43 : bool
44 {
45 $r = $this->database->queryF("SELECT file_id FROM file_data WHERE rid = %s", ['text'],
46 [$identification->serialize()]);
47 $d = $this->database->fetchObject($r);
48 if (isset($d->file_id)) {
49 try {
50 $this->database->manipulateF("UPDATE object_data SET offline = 1 WHERE obj_id = %s", ['text'],
51 [$d->file_id]);
52 } catch (Throwable $t) {
53 return false;
54 }
55 return true;
56 }
57 return false;
58 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296

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

+ Here is the call graph for this function:

Field Documentation

◆ $database

ilObjFileStakeholder::$database
protected

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

◆ $owner

ilObjFileStakeholder::$owner = 6
protected

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

Referenced by __construct(), and getOwnerOfNewResources().


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