ContentFetcher

readonly class \TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher

Class responsible for fetching the content data related to a BackendLayout

  • Reads content records
  • Performs workspace overlay on records
  • Capable of returning all records in active language as flat array
  • Capable of returning records for a given column in a given (optional) language
  • Capable of returning translation data (brief info about translation consistency)

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Methods

__construct()  : mixed
getBackendUser()  : BackendUserAuthentication
getContentRecordsPerColumn()  : array
Gets content records per column.
getFlatContentRecords()  : iterable<string|int, mixed>
getTranslationData()  : array
getUnusedRecords()  : iterable<string|int, mixed>
Allows to decide via an Event whether a custom type has children which were rendered or should not be rendered.
getLanguageService()  : LanguageService
getQueryBuilder()  : QueryBuilder
getResult()  : array
removeWorkspaceDeletedPlaceholdersUidsFromUntranslatedRecordUids()  : array

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, FrontendInterface $runtimeCache, ConnectionPool $connectionPool, TcaSchemaFactory $tcaSchemaFactory, FlashMessageService $flashMessageService, BackendLayoutView $backendLayoutView) : mixed

Parameters

$eventDispatcher : EventDispatcherInterface
$runtimeCache : FrontendInterface
$connectionPool : ConnectionPool
$tcaSchemaFactory : TcaSchemaFactory
$flashMessageService : FlashMessageService
$backendLayoutView : BackendLayoutView

getContentRecordsPerColumn()

Gets content records per column.

public getContentRecordsPerColumn(PageLayoutContext $pageLayoutContext[, int|null $columnNumber = null ][, int|null $languageId = null ]) : array

This is required for correct workspace overlays.

Parameters

$pageLayoutContext : PageLayoutContext
$columnNumber : int|null = null
$languageId : int|null = null

Return values

array —

Associative array for each column (colPos) or for all columns if $columnNumber is null

getFlatContentRecords()

public getFlatContentRecords(PageLayoutContext $pageLayoutContext, int $languageId) : iterable<string|int, mixed>

Parameters

$pageLayoutContext : PageLayoutContext
$languageId : int

Return values

iterable<string|int, mixed>

getTranslationData()

public getTranslationData(PageLayoutContext $pageLayoutContext, iterable<string|int, mixed> $contentElements, int $language) : array

Parameters

$pageLayoutContext : PageLayoutContext
$contentElements : iterable<string|int, mixed>
$language : int

Return values

array

getUnusedRecords()

Allows to decide via an Event whether a custom type has children which were rendered or should not be rendered.

public getUnusedRecords(PageLayoutContext $pageLayoutContext) : iterable<string|int, mixed>

Parameters

$pageLayoutContext : PageLayoutContext

Return values

iterable<string|int, mixed>

getResult()

protected getResult(mixed $result) : array

Parameters

$result : mixed

Return values

array

removeWorkspaceDeletedPlaceholdersUidsFromUntranslatedRecordUids()

protected removeWorkspaceDeletedPlaceholdersUidsFromUntranslatedRecordUids(PageLayoutContext $pageLayoutContext, array $untranslatedRecordUids, int $language) : array

Parameters

$pageLayoutContext : PageLayoutContext
$untranslatedRecordUids : array
$language : int

Return values

array
On this page