TemplateRecordsOverviewController

class \TYPO3\CMS\Tstemplate\Controller\TemplateRecordsOverviewController

Extends
AbstractTemplateModuleController

Overview of all sys_template records from site root

Attributes

#[AsController]

Table of Contents

Properties

$componentFactory  : ComponentFactory
$connectionPool  : ConnectionPool
$iconFactory  : IconFactory
$siteFinder  : SiteFinder
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
handleRequest()  : ResponseInterface
injectComponentFactory()  : void
injectConnectionPool()  : mixed
injectContext()  : void
injectDataHandler()  : mixed
injectIconFactory()  : void
injectSiteFinder()  : mixed
injectTcaSchemaFactory()  : mixed
injectUriBuilder()  : mixed
addPreviewButtonToDocHeader()  : void
addShortcutButtonToDocHeader()  : void
createExtensionTemplateAction()  : ResponseInterface
Action shared by info/modify ond constant editor to create a new "extension template"
createNewWebsiteTemplateAction()  : ResponseInterface
Action shared by info/modify ond constant editor to create a new "site template"
createVisibilityAspect()  : VisibilityAspect
Create a VisibilityAspect that simulates frontend-like behavior: hidden templates and templates outside their scheduled time window are excluded, as they would be in the frontend.
getAllTemplateRecordsOnPage()  : array
Get an array of all template records on a page.
getBackendUser()  : BackendUserAuthentication
getClosestAncestorPageWithTemplateRecord()  : array
Get the closest page row that has a template up in rootline
getFirstTemplateRecordOnPage()  : array<string, mixed>|false
Get a single sys_template record attached to a single page.
getInactiveReason()  : string
Tells why a sys_template record is not taken into account in the frontend: 'hidden', 'starttime' or 'endtime', or an empty string if active.
getLanguageService()  : LanguageService
getRootLine()  : array
The rootline of a page in the workspace of the backend user, in the structure TypoScript expects.
getScopedRootline()  : array
getTemplateQueryBuilder()  : QueryBuilder
Helper method to prepare the query builder for getting sys_template records from a given pid.

Properties

Methods

handleRequest()

public handleRequest(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

addShortcutButtonToDocHeader()

protected addShortcutButtonToDocHeader(ModuleTemplate $view, string $moduleIdentifier, array $pageInfo, int $pageUid, string $moduleTitle) : void

Parameters

$view : ModuleTemplate
$moduleIdentifier : string
$pageInfo : array
$pageUid : int
$moduleTitle : string

createExtensionTemplateAction()

Action shared by info/modify ond constant editor to create a new "extension template"

protected createExtensionTemplateAction(ServerRequestInterface $request, string $redirectTarget) : ResponseInterface

Parameters

$request : ServerRequestInterface
$redirectTarget : string

Return values

ResponseInterface

createNewWebsiteTemplateAction()

Action shared by info/modify ond constant editor to create a new "site template"

protected createNewWebsiteTemplateAction(ServerRequestInterface $request, string $redirectTarget) : ResponseInterface

Parameters

$request : ServerRequestInterface
$redirectTarget : string

Return values

ResponseInterface

createVisibilityAspect()

Create a VisibilityAspect that simulates frontend-like behavior: hidden templates and templates outside their scheduled time window are excluded, as they would be in the frontend.

protected createVisibilityAspect() : VisibilityAspect

Return values

VisibilityAspect

getAllTemplateRecordsOnPage()

Get an array of all template records on a page.

protected getAllTemplateRecordsOnPage(int $pageId) : array

Parameters

$pageId : int

Return values

array

getClosestAncestorPageWithTemplateRecord()

Get the closest page row that has a template up in rootline

protected getClosestAncestorPageWithTemplateRecord(int $pageId) : array

Parameters

$pageId : int

Return values

array

getFirstTemplateRecordOnPage()

Get a single sys_template record attached to a single page.

protected getFirstTemplateRecordOnPage(int $pageId[, int $templateUid = 0 ]) : array<string, mixed>|false

If multiple template records are on this page, the first (order by sorting) record will be returned, unless a specific template uid is specified via $templateUid

Parameters

$pageId : int

The pid to select sys_template records from

$templateUid : int = 0

Optional template uid

Return values

array<string, mixed>|false —

Returns the template record or false if none was found

getInactiveReason()

Tells why a sys_template record is not taken into account in the frontend: 'hidden', 'starttime' or 'endtime', or an empty string if active.

protected getInactiveReason(array $templateRow) : string

Parameters

$templateRow : array

Return values

string

getRootLine()

The rootline of a page in the workspace of the backend user, in the structure TypoScript expects.

protected getRootLine(int $pageId) : array

Parameters

$pageId : int

Return values

array

getScopedRootline()

protected getScopedRootline(SiteInterface $site, array $fullRootLine) : array

Parameters

$site : SiteInterface
$fullRootLine : array

Return values

array

getTemplateQueryBuilder()

Helper method to prepare the query builder for getting sys_template records from a given pid.

protected getTemplateQueryBuilder(int $pid) : QueryBuilder

Parameters

$pid : int

Return values

QueryBuilder
On this page