ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilContentStyleStakeholder Class Reference
+ Inheritance diagram for ilContentStyleStakeholder:
+ Collaboration diagram for ilContentStyleStakeholder:

Public Member Functions

 getId ()
 
 getOwnerOfNewResources ()
 
 canBeAccessedByCurrentUser (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getLocationURIForResourceUsage (ResourceIdentification $identification)
 
- Public Member Functions inherited from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder
 __construct (?int $user_id_of_owner=null)
 
 setOwner (int $user_id_of_owner)
 
 getFullyQualifiedClassName ()
 
 isResourceInUse (ResourceIdentification $identification)
 
 canBeAccessedByCurrentUser (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getOwnerOfResource (ResourceIdentification $identification)
 
 getConsumerNameForPresentation ()
 
 getLocationURIForResourceUsage (ResourceIdentification $identification)
 
- Public Member Functions inherited from ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder
 __construct ()
 Constructor must not have any parameters. More...
 
 getId ()
 
 getConsumerNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 canBeAccessedByCurrentUser (ResourceIdentification $identification)
 
 isResourceInUse (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getOwnerOfResource (ResourceIdentification $identification)
 
 getOwnerOfNewResources ()
 
 getLocationURIForResourceUsage (ResourceIdentification $identification)
 

Protected Attributes

ilDBInterface $database = null
 
- Protected Attributes inherited from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder
int $default_owner
 
int $current_user
 

Private Member Functions

 initDB ()
 

Detailed Description

Definition at line 22 of file class.ilContentStyleStakeholder.php.

Member Function Documentation

◆ canBeAccessedByCurrentUser()

ilContentStyleStakeholder::canBeAccessedByCurrentUser ( ResourceIdentification  $identification)

Reimplemented from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder.

Definition at line 37 of file class.ilContentStyleStakeholder.php.

37 : bool
38 {
39 global $DIC;
40
41 // css is not accessed checked
42 return true;
43
44 /*
45 $object_id = $this->resolveObjectId($identification);
46 if ($object_id === null) {
47 return true;
48 }
49
50 $ref_ids = ilObject2::_getAllReferences($object_id);
51 foreach ($ref_ids as $ref_id) {
52 // one must have read permissions on the exercise to see the instruction files
53 if ($DIC->access()->checkAccessOfUser($this->current_user, 'read', '', $ref_id)) {
54 return true;
55 }
56 }
57
58 return false;*/
59 }
global $DIC
Definition: shib_login.php:26

References $DIC.

◆ getId()

ilContentStyleStakeholder::getId ( )
Returns
string not longer than 64 characters

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

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

27 : string
28 {
29 return 'styl_content';
30 }

◆ getLocationURIForResourceUsage()

ilContentStyleStakeholder::getLocationURIForResourceUsage ( ResourceIdentification  $identification)

Reimplemented from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder.

Definition at line 68 of file class.ilContentStyleStakeholder.php.

68 : ?string
69 {
70 /* since styles are not repo objects, we currently do not have a link here.
71 $this->initDB();
72 $object_id = $this->resolveObjectId($identification);
73 if ($object_id !== null) {
74 $references = ilObject::_getAllReferences($object_id);
75 $ref_id = array_shift($references);
76
77 // we currently deliver the goto-url of the exercise in which the resource is used. if possible, you could deliver a more speficic url wo the assignment as well.
78 return ilLink::_getLink($ref_id, 'exc');
79 }*/
80 return null;
81 }

◆ getOwnerOfNewResources()

◆ initDB()

ilContentStyleStakeholder::initDB ( )
private

Definition at line 97 of file class.ilContentStyleStakeholder.php.

97 : void
98 {
99 global $DIC;
100 if ($this->database === null) {
101 $this->database = $DIC->database();
102 }
103 }

References $DIC, and ILIAS\Repository\database().

+ Here is the call graph for this function:

◆ resourceHasBeenDeleted()

ilContentStyleStakeholder::resourceHasBeenDeleted ( ResourceIdentification  $identification)
Returns
bool true: if the Stakeholder could handle the deletion; false: if the Stakeholder could not handle the deletion of the resource.

Reimplemented from ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder.

Definition at line 61 of file class.ilContentStyleStakeholder.php.

61 : bool
62 {
63 // at this place we could handle de deletion of a resource. not needed for instruction files IMO.
64
65 return true;
66 }

Field Documentation

◆ $database

ilDBInterface ilContentStyleStakeholder::$database = null
protected

Definition at line 24 of file class.ilContentStyleStakeholder.php.


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