‪TYPO3CMS  10.4
TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher Class Reference

Public Member Functions

 __construct (PageLayoutContext $pageLayoutContext)
 
array getContentRecordsPerColumn (?int $columnNumber=null, ?int $languageId=null)
 
 getFlatContentRecords (int $languageId)
 
iterable getUnusedRecords ()
 
 getTranslationData (iterable $contentElements, int $language)
 

Protected Member Functions

 getQueryBuilder ()
 
 getResult ($result)
 
 getLanguageService ()
 
 getRuntimeCache ()
 

Protected Attributes

PageLayoutContext $context
 
array $fetchedContentRecords = array( )
 

Detailed Description

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)

this is experimental and subject to change in TYPO3 v10 / v11

Definition at line 47 of file ContentFetcher.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::__construct ( PageLayoutContext  $pageLayoutContext)

Member Function Documentation

◆ getContentRecordsPerColumn()

array TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::getContentRecordsPerColumn ( ?int  $columnNumber = null,
?int  $languageId = null 
)

Gets content records per column. This is required for correct workspace overlays.

Parameters
int | null$columnNumber
int | null$languageId
Returns
‪array Associative array for each column (colPos) or for all columns if $columnNumber is null

Definition at line 71 of file ContentFetcher.php.

References TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getQueryBuilder(), TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getResult(), and TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getRuntimeCache().

Referenced by TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getFlatContentRecords(), TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getTranslationData(), and TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getUnusedRecords().

◆ getFlatContentRecords()

TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::getFlatContentRecords ( int  $languageId)

◆ getLanguageService()

TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::getLanguageService ( )
protected

◆ getQueryBuilder()

TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::getQueryBuilder ( )
protected

◆ getResult()

◆ getRuntimeCache()

◆ getTranslationData()

◆ getUnusedRecords()

iterable TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::getUnusedRecords ( )

A hook allows to decide whether a custom type has children which were rendered or should not be rendered.

Returns
‪iterable

Definition at line 118 of file ContentFetcher.php.

References $GLOBALS, TYPO3\CMS\Backend\View\PageLayoutView\createFromPageLayoutContext(), and TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getContentRecordsPerColumn().

Member Data Documentation

◆ $context

PageLayoutContext TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::$context
protected

Definition at line 51 of file ContentFetcher.php.

◆ $fetchedContentRecords

array TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher::$fetchedContentRecords = array( )
protected

Definition at line 55 of file ContentFetcher.php.