SiteInlineAjaxController

class \TYPO3\CMS\Backend\Controller\SiteInlineAjaxController

Extends
AbstractFormEngineAjaxController

Site configuration FormEngine controller class. Receives inline "edit" and "new" commands to expand / create site configuration inline records

Table of Contents

Methods

__construct()  : mixed
Default constructor
newInlineChildAction()  : ResponseInterface
Inline "create" new child of site configuration child records
openInlineChildAction()  : ResponseInterface
Show the details of site configuration child records.
addRegisteredRequireJsModulesToJavaScriptItems()  : void
compileChild()  : array
Compile a full child record
createExecutableStringRepresentationOfRegisteredRequireJsModules()  : array
Gets result array from FormEngine and returns string with js modules that need to be loaded and evaluated by JavaScript.
extractSignedParentConfigFromRequest()  : array
Inline ajax helper method.
getInlineFirstPidFromDomObjectId()  : int|null
Get inlineFirstPid from a given objectId string
getLabelsFromLocalizationFile()  : array
Parse a language file and get a label/value array from it.
getLanguageById()  : SiteLanguage|null
Find a site language by id. This will return the first occurrence of a language, even if the same language is used in other site configurations.
getLanguageService()  : LanguageService|null
getRelativePathToStylesheetFile()  : string
Resolve a CSS file position, possibly prefixed with 'EXT:'
mergeChildResultIntoJsonResult()  : array
Merge stuff from child array into json array.
serializeJavaScriptModuleInstructionItems()  : array

Methods

__construct()

Default constructor

public __construct() : mixed

newInlineChildAction()

Inline "create" new child of site configuration child records

public newInlineChildAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Tags

throws
RuntimeException

Return values

ResponseInterface

openInlineChildAction()

Show the details of site configuration child records.

public openInlineChildAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Tags

throws
RuntimeException

Return values

ResponseInterface

addRegisteredRequireJsModulesToJavaScriptItems()

protected addRegisteredRequireJsModulesToJavaScriptItems(array $result, JavaScriptItems $items) : void

Parameters

$result : array
$items : JavaScriptItems

compileChild()

Compile a full child record

protected compileChild(array $parentData, string $parentFieldName, int $childUid, array $inlineStructure) : array

Parameters

$parentData : array

Result array of parent

$parentFieldName : string

Name of parent field

$childUid : int

Uid of child to compile

$inlineStructure : array

Current inline structure

Tags

throws
RuntimeException
todo:

This clones methods compileChild from TcaInline Provider. Find a better abstraction

todo:

to also encapsulate the more complex scenarios with combination child and friends.

Return values

array —

Full result array

createExecutableStringRepresentationOfRegisteredRequireJsModules()

Gets result array from FormEngine and returns string with js modules that need to be loaded and evaluated by JavaScript.

protected createExecutableStringRepresentationOfRegisteredRequireJsModules(array $result[, bool $skipInstructions = false ]) : array

Parameters

$result : array
$skipInstructions : bool = false

whether to skip JavaScriptModuleInstruction

Return values

array

extractSignedParentConfigFromRequest()

Inline ajax helper method.

protected extractSignedParentConfigFromRequest(string $contextString) : array

Validates the config that is transferred over the wire to provide the correct TCA config for the parent table

Parameters

$contextString : string

Tags

throws
RuntimeException

Return values

array

getInlineFirstPidFromDomObjectId()

Get inlineFirstPid from a given objectId string

protected getInlineFirstPidFromDomObjectId(string $domObjectId) : int|null

Parameters

$domObjectId : string

The id attribute of an element

Return values

int|null —

Pid or null

getLabelsFromLocalizationFile()

Parse a language file and get a label/value array from it.

protected getLabelsFromLocalizationFile(string $file) : array

Parameters

$file : string

EXT:path/to/file

Return values

array —

Label/value array

getLanguageById()

Find a site language by id. This will return the first occurrence of a language, even if the same language is used in other site configurations.

protected getLanguageById(int $languageId) : SiteLanguage|null

Parameters

$languageId : int

Return values

SiteLanguage|null

getRelativePathToStylesheetFile()

Resolve a CSS file position, possibly prefixed with 'EXT:'

protected getRelativePathToStylesheetFile(string $stylesheetFile) : string

Parameters

$stylesheetFile : string

Given file, possibly prefixed with EXT:

Return values

string —

Web root relative position to file

mergeChildResultIntoJsonResult()

Merge stuff from child array into json array.

protected mergeChildResultIntoJsonResult(array $jsonResult, array $childResult) : array

This method is needed since ajax handling methods currently need to put scriptCalls before and after child code.

Parameters

$jsonResult : array

Given json result

$childResult : array

Given child result

Return values

array —

Merged json array

On this page