Build the container config from legacy DCA syntax.

Abstract base class for an data definition builder. To use it, implement the method build() and register the class to the event dispatcher.

 Methods

{@inheritDoc}

build(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container, \ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent $event) 
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$container

$event

Create a command from dca.

createCommand(string $commandName, array $commandDca) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface

Parameters

$commandName

string

The name of the command to parse.

$commandDca

array

The chunk from the DCA containing the command specification.

Returns

Create the correct command instance for the given information.

createCommandInstance(string $commandName, array $commandDca) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface

Parameters

$commandName

string

The name of the command to create.

$commandDca

array

The Dca information of the command.

Returns

Evaluate the contao 2 sorting flag into sorting mode, grouping mode and grouping length.

evalFlag(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingInformationInterface $config, int $flag) : void

Parameters

$flag

int

The flag to be evaluated.

Evaluate the contao 2 sorting flag into grouping mode.

evalFlagGrouping(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingInformationInterface $config, int $flag) : void

Parameters

$flag

int

The flag to be evaluated.

Evaluate the contao 2 sorting flag into grouping length.

evalFlagGroupingLength(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingInformationInterface $config, int $flag) : void

Parameters

$flag

int

The flag to be evaluated.

Evaluate the contao 2 sorting flag into sorting mode.

evalFlagSorting(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingInformationInterface $config, int $flag) : void

Parameters

$flag

int

The flag to be evaluated.

Determine the root provider name from the container.

getRootProviderName(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : string

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container from where the name shall be retrieved.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException If the root provider can not be determined.

Returns

string

Load additional definitions, like naming of parent data provider.

loadAdditionalDefinitions(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void
This method will register an event to the populate environment event in which the parent data provider container will get loaded.

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse and build the backend view definition for the old Contao2 backend view.

parseBackendView(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException If the stored backend view definition does not implement the correct interface.

Parse the basic configuration and populate the definition.

parseBasicDefinition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse the basic flags.

parseBasicFlags(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface $config) : void

Parameters

Parse the mode, flat, parented or hierarchical.

parseBasicMode(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface $config) : void

Parameters

Register the callback handlers for the given legacy callbacks.

parseCallback(\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, array $callbacks, string $eventName, array $arguments, string $listener) : void

Parameters

$callbacks

array

The callbacks to be handled.

$eventName

string

The event to be registered to.

$arguments

array

The arguments to pass to the constructor.

$listener

string

The listener class to use.

Parse the basic configuration and populate the definition.

parseCallbacks(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container, \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

$dispatcher

\Symfony\Component\EventDispatcher\EventDispatcherInterface

The event dispatcher in use.

This method parses all data provider related information from Contao legacy data container arrays.

parseDataProvider(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse the defined container scoped operations and populate the definition.

parseGlobalOperations(\ContaoCommunityAlliance\DcGeneral\Contao\DataDefinition\Definition\Contao2BackendViewDefinitionInterface $view) : void

Parameters

Parse the sorting part of listing configuration.

parseListLabel(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\ListingConfigInterface $listing, array $listDca) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

$listing

\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\ListingConfigInterface

The listing configuration definition to populate.

$listDca

array

The DCA part containing the information to use.

Parse the sorting part of listing configuration.

parseListSorting(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\ListingConfigInterface $listing, array $listDca) : array
NOTE: this method currently does NOT support the custom SQL sorting information as supported by DC_Table in Contao.

Parameters

$listing

\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\ListingConfigInterface

The listing configuration definition to populate.

$listDca

array

The DCA part containing the information to use.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException In case unsupported values are encountered.

Returns

array

Parse the listing configuration.

parseListing(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container, \ContaoCommunityAlliance\DcGeneral\Contao\DataDefinition\Definition\Contao2BackendViewDefinitionInterface $view) : array

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Returns

array

Parse the defined model scoped operations and populate the definition.

parseModelOperations(\ContaoCommunityAlliance\DcGeneral\Contao\DataDefinition\Definition\Contao2BackendViewDefinitionInterface $view) : void

Parameters

Parse the defined palettes and populate the definition.

parsePalettes(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void
SuppressWarnings (PHPMD.LongVariable)

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse the defined palettes and populate the definition.

parsePanel(\ContaoCommunityAlliance\DcGeneral\Contao\DataDefinition\Definition\Contao2BackendViewDefinitionInterface $view) : void

Add filter elements to the panel.

parsePanelFilter(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row) : void

Parameters

Add elements to the panel.

parsePanelLimit(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row) : void

Parameters

Parse a single panel row.

parsePanelRow(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row, string $elementList) : void

Parameters

$elementList

string

A comma separated list of elements to be stored in the row.

Add search element to the panel.

parsePanelSearch(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row) : void

Parameters

Add sort element to the panel.

parsePanelSort(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row) : void

Parameters

Add elements to the panel.

parsePanelSubmit(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface $row) : void

Parameters

This method parses the parent-child conditions.

parseParentChildConditions(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse the defined properties and populate the definition.

parseProperties(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse the basic configuration and populate the definition.

parsePropertyCallbacks(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container, \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

$dispatcher

\Symfony\Component\EventDispatcher\EventDispatcherInterface

The event dispatcher in use.

Parse the sorting and grouping information for a given property.

parsePropertySortingAndGrouping(string $propName, array $propInfo, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingDefinitionCollectionInterface $definitions, array $parsedProperties) : void

Parameters

$propName

string

The property to parse.

$propInfo

array

The property information.

$parsedProperties

array

A list of properties already parsed.

Parse the sorting and grouping information for all properties.

parsePropertySortingAndGroupings(\ContaoCommunityAlliance\DcGeneral\Contao\DataDefinition\Definition\Contao2BackendViewDefinitionInterface $view, array $parsedProperties) : void

Parameters

$parsedProperties

array

A list of properties already parsed.

This method parses the root entries definition.

parseRootEntries(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : void

Parameters

$container

\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface

The container where the data shall be stored.

Parse a single property.

parseSingleProperty(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface $property, array $propInfo) : void
SuppressWarnings (PHPMD.CyclomaticComplexity)

Parameters

$propInfo

array

The property information.

Parse the label of a single property.

parseSinglePropertyLabel(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface $property, string|array $label) : void

Parameters

$label

stringarray

The label value.

Check if the rows is somewhere a submit element.

hasSubmit(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowCollectionInterface $rows) : bool

 Constants

 

PRIORITY

PRIORITY