‪TYPO3CMS  ‪main
ScopeRepository.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
27 {
28  public function ‪__construct(protected readonly ‪SiteFinder $siteFinder) {}
29 
33  public function ‪findAll(): array
34  {
35  return array_merge(
37  array_values($this->‪findAllFrontendSites())
38  );
39  }
40 
44  public function ‪findAllFrontendSites(): array
45  {
46  return array_map(
48  array_values($this->siteFinder->getAllSites())
49  );
50  }
51 }
‪TYPO3\CMS\Core\Site\Entity\SiteInterface
Definition: SiteInterface.php:26
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope\backend
‪static backend()
Definition: Scope.php:41
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\ScopeRepository\__construct
‪__construct(protected readonly SiteFinder $siteFinder)
Definition: ScopeRepository.php:28
‪TYPO3\CMS\Core\Site\SiteFinder
Definition: SiteFinder.php:31
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope\frontend
‪static frontend()
Definition: Scope.php:46
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\ScopeRepository\findAll
‪list< Scope > findAll()
Definition: ScopeRepository.php:33
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\ScopeRepository
Definition: ScopeRepository.php:27
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\ScopeRepository\findAllFrontendSites
‪list< Scope > findAllFrontendSites()
Definition: ScopeRepository.php:44
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy
Definition: ConsumableNonce.php:18
‪TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope\frontendSiteIdentifier
‪static frontendSiteIdentifier(string $siteIdentifier)
Definition: Scope.php:64
‪TYPO3\CMS\Core\Site\Entity\SiteInterface\getIdentifier
‪getIdentifier()