zwischenstand
This commit is contained in:
@@ -25,6 +25,7 @@ namespace WapplerSystems\Meilisearch\Domain\Index;
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use TYPO3\CMS\Core\Utility\DebugUtility;
|
||||
use WapplerSystems\Meilisearch\ConnectionManager;
|
||||
use WapplerSystems\Meilisearch\IndexQueue\Indexer;
|
||||
use WapplerSystems\Meilisearch\IndexQueue\Item;
|
||||
|
@@ -130,9 +130,7 @@ class Builder
|
||||
*/
|
||||
public function fromRecord(array $itemRecord, string $type, int $rootPageUid, string $accessRootLine): array
|
||||
{
|
||||
/* @var $document Document */
|
||||
$document = GeneralUtility::makeInstance(Document::class);
|
||||
|
||||
$document = [];
|
||||
$site = $this->getSiteByPageId($rootPageUid);
|
||||
|
||||
$documentId = $this->getDocumentId($type, $site->getRootPageId(), $itemRecord['uid']);
|
||||
@@ -174,7 +172,7 @@ class Builder
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TypoScriptFrontendController $page
|
||||
* @param TypoScriptFrontendController $frontendController
|
||||
* @param string $accessGroups
|
||||
* @param string $mountPointParameter
|
||||
* @return string
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
@@ -290,6 +290,7 @@ class SiteRepository
|
||||
|
||||
return GeneralUtility::makeInstance(
|
||||
Typo3ManagedSite::class,
|
||||
$typo3Site,
|
||||
/** @scrutinizer ignore-type */
|
||||
$meilisearchConfiguration,
|
||||
/** @scrutinizer ignore-type */
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user