‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository Class Reference

Public Member Functions

 __construct (private readonly Map $staticMutations, private readonly SiteFinder $siteFinder, private readonly ModelService $modelService, private readonly ScopeRepository $scopeRepository, private readonly ResolutionRepository $resolutionRepository,)
 
Map< Scope, findAll(bool $resolved=true):Map { if( $resolved) { $this-> resolveMutations ()
 
Map< MutationOrigin, findByScope(Scope $scope, bool $resolved=true):Map { if( $resolved) { $this-> resolveMutations ()
 

Public Attributes

return $this resolvedMutations
 
return $this staticMutations
 
if(!isset($this->resolvedMutations[$reducedScope])) return $this resolvedMutations [$reducedScope]
 

Private Member Functions

 resolveMutations ()
 
 resolveFrontendSiteMutationCollection (Site $site)
 
Map< MutationOrigin, provideScopeInResolvedMutations(Scope $scope):Map { $reducedScope=$this-> reduceScope ($scope)
 
 reduceScope (Scope $scope)
 
 resolveSite (Scope $scope)
 

Private Attributes

Map $resolvedMutations
 

Detailed Description

Definition at line 28 of file MutationRepository.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::__construct ( private readonly Map  $staticMutations,
private readonly SiteFinder  $siteFinder,
private readonly ModelService  $modelService,
private readonly ScopeRepository  $scopeRepository,
private readonly ResolutionRepository  $resolutionRepository 
)
Parameters
Map<Scope,Map<MutationOrigin,MutationCollection>>‪$staticMutations (from DI, declared in Configuration/ContentSecurityPolicies.php)

Definition at line 36 of file MutationRepository.php.

References TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository\resolvedMutations.

Member Function Documentation

◆ reduceScope() [1/2]

Map<MutationOrigin, provideScopeInResolvedMutations(Scope $scope): Map { $reducedScope = $this-> TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::reduceScope (   $scope)
private
Returns
‪Map<MutationOrigin, MutationCollection>

◆ reduceScope() [2/2]

TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::reduceScope ( Scope  $scope)
private

Returns a reduce representation of the current object. In case a Site object was given, it will be reduced to just contain the site identifier.

Definition at line 135 of file MutationRepository.php.

References TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope\frontendSiteIdentifier(), and TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope\isFrontendSite().

◆ resolveFrontendSiteMutationCollection()

TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolveFrontendSiteMutationCollection ( Site  $site)
private

◆ resolveMutations() [1/3]

Map<Scope, findAll(bool $resolved = true): Map { if ($resolved) { $this-> TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolveMutations ( )
Parameters
bool$resolved‪whether to include resolved mutations (resolutions)
Returns
‪Map<Scope, Map<MutationOrigin, MutationCollection>>

◆ resolveMutations() [2/3]

Map<MutationOrigin, findByScope(Scope $scope, bool $resolved = true): Map { if ($resolved) { $this-> TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolveMutations ( )
Parameters
bool$resolved‪whether to include resolved mutations (resolutions)
Returns
‪Map<MutationOrigin, MutationCollection>

◆ resolveMutations() [3/3]

◆ resolveSite()

TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolveSite ( Scope  $scope)
private

Member Data Documentation

◆ $resolvedMutations

Map TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::$resolvedMutations
private

Definition at line 30 of file MutationRepository.php.

◆ resolvedMutations [1/2]

return $this TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolvedMutations

◆ resolvedMutations [2/2]

if (!isset( $this->resolvedMutations[ $reducedScope])) return $this TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::resolvedMutations[ $reducedScope]

Definition at line 128 of file MutationRepository.php.

◆ staticMutations

return $this TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationRepository::staticMutations

Definition at line 56 of file MutationRepository.php.