zwischenstand

This commit is contained in:
Sven Wappler
2021-04-29 18:33:05 +02:00
parent 2c9e27b3b7
commit 0ee2fae261
264 changed files with 263 additions and 21253 deletions

View File

@@ -33,7 +33,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Base Clas for Typo3ManagedSite and LegacySite
*/
abstract class Site implements SiteInterface
{
@@ -42,6 +41,11 @@ abstract class Site implements SiteInterface
*/
protected $configuration;
/**
* @var \TYPO3\CMS\Core\Site\Entity\Site
*/
protected $site;
/**
* Root page record.
*
@@ -63,16 +67,6 @@ abstract class Site implements SiteInterface
*/
protected $pagesRepository;
/**
* @var int
*/
protected $defaultLanguageId = 0;
/**
* @var int[] Available language ids
*/
protected $availableLanguageIds = [];
/**
* Takes an pagerecord and checks whether the page is marked as root page.
*
@@ -100,14 +94,14 @@ abstract class Site implements SiteInterface
}
/**
* Gets available language id's for this site
*
* @return int[] array or language id's
* @return \TYPO3\CMS\Core\Site\Entity\Site
*/
public function getAvailableLanguageIds(): array {
return $this->availableLanguageIds;
public function getSite(): \TYPO3\CMS\Core\Site\Entity\Site
{
return $this->site;
}
/**
* Gets the site's label. The label is build from the the site title and root
* page ID (uid).
@@ -137,17 +131,6 @@ abstract class Site implements SiteInterface
return $this->configuration;
}
/**
* Gets the site's default language as configured in
* config.sys_language_uid. If sys_language_uid is not set, 0 is assumed to
* be the default.
*
* @return int The site's default language.
*/
public function getDefaultLanguage()
{
return $this->defaultLanguageId;
}
/**
* Generates a list of page IDs in this site. Attention, this includes

View File

@@ -36,13 +36,6 @@ interface SiteInterface
*/
public function getRootPageId();
/**
* Gets available language id's for this site
*
* @return int[] array or language id's
*/
public function getAvailableLanguageIds(): array;
/**
* Gets the site's label. The label is build from the the site title and root
* page ID (uid).
@@ -58,15 +51,6 @@ interface SiteInterface
*/
public function getMeilisearchConfiguration();
/**
* Gets the site's default language as configured in
* config.sys_language_uid. If sys_language_uid is not set, 0 is assumed to
* be the default.
*
* @return int The site's default language.
*/
public function getDefaultLanguage();
/**
* Generates a list of page IDs in this site. Attention, this includes
* all page types! Deleted pages are not included.

View File

@@ -290,6 +290,7 @@ class SiteRepository
return GeneralUtility::makeInstance(
Typo3ManagedSite::class,
$typo3Site,
/** @scrutinizer ignore-type */
$meilisearchConfiguration,
/** @scrutinizer ignore-type */

View File

@@ -51,9 +51,11 @@ class Typo3ManagedSite extends Site
public function __construct(
$site,
TypoScriptConfiguration $configuration,
array $page, $domain, $siteHash, PagesRepository $pagesRepository = null, array $meilisearchConnectionConfiguration = [], Typo3Site $typo3SiteObject = null)
{
$this->site = $site;
$this->configuration = $configuration;
$this->rootPage = $page;
$this->domain = $domain;