ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder:
+ Collaboration diagram for ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder:

Public Member Functions

 __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 ()
 
 getOwnerOfNewResources ()
 

Protected Attributes

int $default_owner
 
int $current_user
 

Private Attributes

string $provider_name_cache = ''
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::__construct ( ?int  $user_id_of_owner = null)

Definition at line 36 of file AbstractResourceStakeholder.php.

References $DIC, ILIAS\Repository\int(), ILIAS\DI\Container\isDependencyAvailable(), null, and SYSTEM_USER_ID.

37  {
38  global $DIC;
39 
40  if ($user_id_of_owner === null) {
41  $user_id_of_owner = $DIC instanceof Container && $DIC->isDependencyAvailable('user')
42  ? $DIC->user()->getId()
43  : (defined('SYSTEM_USER_ID') ? (int) SYSTEM_USER_ID : 6);
44  }
45 
46  $this->default_owner = $this->current_user = $user_id_of_owner;
47  }
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ canBeAccessedByCurrentUser()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::canBeAccessedByCurrentUser ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 64 of file AbstractResourceStakeholder.php.

64  : bool
65  {
66  return true;
67  }

◆ getConsumerNameForPresentation()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getConsumerNameForPresentation ( )

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 79 of file AbstractResourceStakeholder.php.

References $parts, and ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder\$provider_name_cache.

79  : string
80  {
81  if ($this->provider_name_cache !== "" && is_string($this->provider_name_cache)) {
83  }
84 
85  $reflector = new \ReflectionClass($this);
86 
87  $dirname = dirname($reflector->getFileName());
88  $after_components = substr($dirname, strpos($dirname, '/components/') + strlen('/components/'));
89  $parts = explode(
90  DIRECTORY_SEPARATOR,
91  $after_components
92  );
93 
94  $parts = array_filter($parts, static function ($part): bool {
95  $ignore = ['IRSS', 'Storage', 'ResourceStorage', 'classes'];
96  return $part !== '' && !in_array($part, $ignore, true);
97  });
98 
99  return $this->provider_name_cache = implode('/', $parts);
100  }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

◆ getFullyQualifiedClassName()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getFullyQualifiedClassName ( )
Returns
string not longer than 250 characters

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 54 of file AbstractResourceStakeholder.php.

54  : string
55  {
56  return static::class;
57  }

◆ getLocationURIForResourceUsage()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getLocationURIForResourceUsage ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 102 of file AbstractResourceStakeholder.php.

References null.

102  : ?string
103  {
104  return null;
105  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getOwnerOfResource()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getOwnerOfResource ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 74 of file AbstractResourceStakeholder.php.

74  : int
75  {
76  return 6;
77  }

◆ isResourceInUse()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::isResourceInUse ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 59 of file AbstractResourceStakeholder.php.

59  : bool
60  {
61  return false;
62  }

◆ resourceHasBeenDeleted()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::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.

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Definition at line 69 of file AbstractResourceStakeholder.php.

69  : bool
70  {
71  return true;
72  }

◆ setOwner()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::setOwner ( int  $user_id_of_owner)

Definition at line 49 of file AbstractResourceStakeholder.php.

Referenced by ILIAS\components\WOPI\Handler\WOPIStakeholderWrapper\init().

49  : void
50  {
51  $this->default_owner = $user_id_of_owner;
52  }
+ Here is the caller graph for this function:

Field Documentation

◆ $current_user

int ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$current_user
protected

◆ $default_owner

int ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$default_owner
protected

Definition at line 33 of file AbstractResourceStakeholder.php.

Referenced by ilDataCollectionStakeholder\getOwnerOfNewResources(), ilBadgeFileStakeholder\getOwnerOfNewResources(), ilMDCopyrightImageStakeholder\getOwnerOfNewResources(), ilBookBookingInfoStakeholder\getOwnerOfNewResources(), assFileUploadStakeholder\getOwnerOfNewResources(), ilExportHTMLStakeholder\getOwnerOfNewResources(), ILIAS\components\WOPI\Handler\WOPIUnknownStakeholder\getOwnerOfNewResources(), ilBookObjectInfoStakeholder\getOwnerOfNewResources(), ilExcSampleSolutionStakeholder\getOwnerOfNewResources(), ilHTLMStakeholder\getOwnerOfNewResources(), ilExcSubmissionStakeholder\getOwnerOfNewResources(), ILIAS\Test\ExportImport\ResultsExportStakeholder\getOwnerOfNewResources(), ilExcTutorFeedbackFileStakeholder\getOwnerOfNewResources(), ilMobStakeholder\getOwnerOfNewResources(), ilExcTutorFeedbackZipStakeholder\getOwnerOfNewResources(), ilContentStyleStakeholder\getOwnerOfNewResources(), ilExcTutorTeamFeedbackFileStakeholder\getOwnerOfNewResources(), ILIAS\AdvancedMetaData\Record\File\Repository\Stakeholder\Handler\getOwnerOfNewResources(), ilUserProfilePictureStakeholder\getOwnerOfNewResources(), ilExcPeerReviewFileStakeholder\getOwnerOfNewResources(), ilStudyProgrammeTypeStakeholder\getOwnerOfNewResources(), ilIndividualAssessmentGradingStakeholder\getOwnerOfNewResources(), ilTemporaryStakeholder\getOwnerOfNewResources(), ilForumPostingFileStakeholder\getOwnerOfNewResources(), ILIAS\UI\Component\Input\Field\File\ilCertificateTemplateStakeholder\getOwnerOfNewResources(), ilOrgUnitTypeStakeholder\getOwnerOfNewResources(), ilMMStorageStakeholder\getOwnerOfNewResources(), ILIAS\ILIASObject\Properties\CoreProperties\TileImage\Stakeholder\getOwnerOfNewResources(), ILIAS\File\Icon\ilObjFileIconStakeholder\getOwnerOfNewResources(), ilSkillProfileStorageStakeHolder\getOwnerOfNewResources(), ilExcInstructionFilesStakeholder\getOwnerOfNewResources(), ilObjFileStakeholder\getOwnerOfNewResources(), and ilObjBibliographicStakeholder\getOwnerOfNewResources().

◆ $provider_name_cache

string ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$provider_name_cache = ''
private

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