InlineStackProcessor

Read onlyYes

Handle inline stack.

Code related to inline elements need to know their nesting level. This class takes care of the according handling and can return field prefixes to be used in DOM.

Tags
internal:

This class may change any time or vanish altogether

Table of Contents

Methods

addAjaxConfigurationToStructure()  : array<string|int, mixed>
Injects configuration via AJAX calls.
getDomObjectIdPrefixFromStructure()  : string
DOM object-id for this inline level
getFormPrefixFromStructure()  : string
Prefix for inline form fields
getStructureFromString()  : array<string|int, mixed>
Convert the DOM object-id of an inline container to an array.
getStructureLevelFromStructure()  : array<string|int, mixed>|null
Get a level from the stack and return the data.
getUnstableStructureFromStructure()  : array<string|int, mixed>
Get the "unstable" structure item from structure stack.

Methods

addAjaxConfigurationToStructure()

Injects configuration via AJAX calls.

public addAjaxConfigurationToStructure(array<string|int, mixed> $structure, array<string|int, mixed> $config) : array<string|int, mixed>

This is used by inline ajax calls that transfer configuration options back to the stack for initialization.

Parameters
$structure : array<string|int, mixed>
$config : array<string|int, mixed>

Given config extracted from ajax call

Tags
todo:

Review this construct - Why can't the ajax call fetch these data on its own and transfers it to client instead?

Return values
array<string|int, mixed>

getDomObjectIdPrefixFromStructure()

DOM object-id for this inline level

public getDomObjectIdPrefixFromStructure(array<string|int, mixed> $structure, int|string $inlineFirstPid) : string
Parameters
$structure : array<string|int, mixed>
$inlineFirstPid : int|string

Pid of top level inline element storage or "NEW..."

Return values
string

getFormPrefixFromStructure()

Prefix for inline form fields

public getFormPrefixFromStructure(array<string|int, mixed> $structure) : string
Parameters
$structure : array<string|int, mixed>
Return values
string

getStructureFromString()

Convert the DOM object-id of an inline container to an array.

public getStructureFromString(string $domObjectId) : array<string|int, mixed>

The object-id could look like 'data-bs-parentPageId-tx_mmftest_company-1-employees'. There are two keys:

  • 'stable': Containing full qualified identifiers (table, uid and field)
  • 'unstable': Containing partly filled data (e.g. only table and possibly field)
Parameters
$domObjectId : string

The DOM object-id

Return values
array<string|int, mixed>

getStructureLevelFromStructure()

Get a level from the stack and return the data.

public getStructureLevelFromStructure(array<string|int, mixed> $structure, int $level) : array<string|int, mixed>|null

If the $level value is negative, this function works top-down, if the $level value is positive, this function works bottom-up. If -1 is given, the "current" - most bottom "stable" item is returned

Parameters
$structure : array<string|int, mixed>
$level : int

Which level to return

Return values
array<string|int, mixed>|null

The item of the stack at the requested level, or null if not found

getUnstableStructureFromStructure()

Get the "unstable" structure item from structure stack.

public getUnstableStructureFromStructure(array<string|int, mixed> $structure) : array<string|int, mixed>
Parameters
$structure : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results