FileReferenceContainer extends AbstractContainer

Render a single file reference.

This container is called by FilesControlContainer to render a single file (reference). The container is also called by FormEngine for an incoming ajax request to expand an existing file (reference) or to create a new one.

This container creates the outer HTML of single file (references) - e.g. drag and drop and delete buttons. For rendering of the record itself processing is handed over to FullRecordContainer.

Table of Contents

Properties

$backendViewFactory  : BackendViewFactory
$data  : array<string|int, mixed>
Main data array to work on, given from parent to child elements
$defaultFieldControl  : array<string|int, mixed>
A list of default field controls added to the element / container.
$defaultFieldInformation  : array<string|int, mixed>
A list of default field information added to the element / container.
$defaultFieldWizard  : array<string|int, mixed>
A list of default field wizards added to the element / container.
$fileReferenceData  : array<string|int, mixed>
File reference data used for JSON output
$nodeFactory  : NodeFactory

Methods

__construct()  : mixed
injectBackendViewFactory()  : mixed
injectNodeFactory()  : void
Injection of NodeFactory, which is used in this abstract already.
render()  : array<string|int, mixed>
Handler for single nodes
setData()  : void
Retrieve the current data array from NodeFactory.
explodeSingleFieldShowItemConfiguration()  : array<string|int, mixed>
A single field of TCA 'types' 'showitem' can have three semicolon separated configuration options: fieldName: Name of the field to be found in TCA 'columns' section fieldLabel: An alternative field label paletteName: Name of a palette to be found in TCA 'palettes' section that is rendered after this field
getBackendUserAuthentication()  : BackendUserAuthentication
getLabelFieldForRecord()  : string
getLanguageService()  : LanguageService
getRecordTitle()  : string
getTitleForRecord()  : string
getValidationDataAsJsonString()  : string
Build JSON string for validations rules.
initializeResultArray()  : array<string|int, mixed>
Initialize the array that is returned to parent after calling. This structure is identical for *all* nodes. Parent will merge the return of a child with its own stuff and in itself return an array of the same structure.
mergeChildReturnIntoExistingResult()  : array<string|int, mixed>
Merge existing data with a child return array.
renderFieldControl()  : array<string|int, mixed>
Merge field control configuration with default controls and render them.
renderFieldInformation()  : array<string|int, mixed>
Merge field information configuration with default and render them.
renderFieldWizard()  : array<string|int, mixed>
Merge field wizard configuration with default wizards and render them.
renderFileHeader()  : string
Renders the HTML header for the file, such as the title, toggle-function, drag'n'drop, etc.
renderFileReference()  : array<string|int, mixed>
renderFileReferenceHeaderControl()  : string
Render the control-icons for a file reference (e.g. create new, sorting, delete, disable/enable).
renderTabMenu()  : string
Render tabs with label and content. Used by TabsContainer and FlexFormTabsContainer.
wrapWithFieldsetAndLegend()  : string

Properties

$data

Main data array to work on, given from parent to child elements

protected array<string|int, mixed> $data = []

$defaultFieldControl

A list of default field controls added to the element / container.

protected array<string|int, mixed> $defaultFieldControl = []

This property is often reset by single elements.

$defaultFieldInformation

A list of default field information added to the element / container.

protected array<string|int, mixed> $defaultFieldInformation = []

$defaultFieldWizard

A list of default field wizards added to the element / container.

protected array<string|int, mixed> $defaultFieldWizard = []

This property is often reset by single elements.

$fileReferenceData

File reference data used for JSON output

protected array<string|int, mixed> $fileReferenceData = []

Methods

__construct()

public __construct(IconFactory $iconFactory, InlineStackProcessor $inlineStackProcessor, EventDispatcherInterface $eventDispatcher, ResourceFactory $resourceFactory, ConnectionPool $connectionPool, UriBuilder $uriBuilder, MetaDataRepository $metaDataRepository) : mixed
Parameters
$iconFactory : IconFactory
$inlineStackProcessor : InlineStackProcessor
$eventDispatcher : EventDispatcherInterface
$resourceFactory : ResourceFactory
$connectionPool : ConnectionPool
$uriBuilder : UriBuilder
$metaDataRepository : MetaDataRepository

injectNodeFactory()

Injection of NodeFactory, which is used in this abstract already.

public injectNodeFactory(NodeFactory $nodeFactory) : void

Using inject* method to not pollute __construct() for inheriting classes.

Parameters
$nodeFactory : NodeFactory

render()

Handler for single nodes

public render() : array<string|int, mixed>
Return values
array<string|int, mixed>

As defined in initializeResultArray() of AbstractNode

setData()

Retrieve the current data array from NodeFactory.

public setData(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

explodeSingleFieldShowItemConfiguration()

A single field of TCA 'types' 'showitem' can have three semicolon separated configuration options: fieldName: Name of the field to be found in TCA 'columns' section fieldLabel: An alternative field label paletteName: Name of a palette to be found in TCA 'palettes' section that is rendered after this field

protected explodeSingleFieldShowItemConfiguration(string $field) : array<string|int, mixed>
Parameters
$field : string

Semicolon separated field configuration

Tags
throws
RuntimeException
Return values
array<string|int, mixed>

getLabelFieldForRecord()

protected getLabelFieldForRecord(array<string|int, mixed> $databaseRow, array<string|int, mixed> $fileRecord, string $field) : string
Parameters
$databaseRow : array<string|int, mixed>
$fileRecord : array<string|int, mixed>
$field : string
Return values
string

getRecordTitle()

protected getRecordTitle() : string
Return values
string

getTitleForRecord()

protected getTitleForRecord(array<string|int, mixed> $databaseRow, array<string|int, mixed> $fileRecord) : string
Parameters
$databaseRow : array<string|int, mixed>
$fileRecord : array<string|int, mixed>
Return values
string

getValidationDataAsJsonString()

Build JSON string for validations rules.

protected getValidationDataAsJsonString(array<string|int, mixed> $config) : string
Parameters
$config : array<string|int, mixed>
Return values
string

initializeResultArray()

Initialize the array that is returned to parent after calling. This structure is identical for *all* nodes. Parent will merge the return of a child with its own stuff and in itself return an array of the same structure.

protected initializeResultArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

mergeChildReturnIntoExistingResult()

Merge existing data with a child return array.

protected mergeChildReturnIntoExistingResult(array<string|int, mixed> $existing, array<string|int, mixed> $childReturn[, bool $mergeHtml = true ]) : array<string|int, mixed>

The incoming $childReturn array should be initialized using initializeResultArray() beforehand.

Parameters
$existing : array<string|int, mixed>

Currently merged array

$childReturn : array<string|int, mixed>

Array returned by child

$mergeHtml : bool = true

If false, the ['html'] section of $childReturn will NOT be added to $existing

Return values
array<string|int, mixed>

Result array

renderFieldControl()

Merge field control configuration with default controls and render them.

protected renderFieldControl() : array<string|int, mixed>
Return values
array<string|int, mixed>

Result array

renderFieldInformation()

Merge field information configuration with default and render them.

protected renderFieldInformation() : array<string|int, mixed>
Return values
array<string|int, mixed>

Result array

renderFieldWizard()

Merge field wizard configuration with default wizards and render them.

protected renderFieldWizard() : array<string|int, mixed>
Return values
array<string|int, mixed>

Result array

renderFileHeader()

Renders the HTML header for the file, such as the title, toggle-function, drag'n'drop, etc.

protected renderFileHeader(string $ariaAttributesString) : string

Later on the command-icons are inserted here, too.

Parameters
$ariaAttributesString : string
Return values
string

renderFileReference()

protected renderFileReference(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

renderFileReferenceHeaderControl()

Render the control-icons for a file reference (e.g. create new, sorting, delete, disable/enable).

protected renderFileReferenceHeaderControl() : string
Return values
string

renderTabMenu()

Render tabs with label and content. Used by TabsContainer and FlexFormTabsContainer.

protected renderTabMenu(array<string|int, mixed> $menuItems, string $domId) : string

Re-uses the template Tabs.html which is also used by ModuleTemplate.php.

Parameters
$menuItems : array<string|int, mixed>

Tab elements, each element is an array with "label" and "content"

$domId : string

DOM id attribute, will be appended with an iteration number per tab.

Return values
string

wrapWithFieldsetAndLegend()

protected wrapWithFieldsetAndLegend(string $fieldContent) : string
Parameters
$fieldContent : string
Return values
string

        
On this page

Search results