This interface describes a controller.

 Methods

Evaluate clipboard items, then return the corresponding models.

applyClipboardActions(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $source, \ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $after, \ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $into, \ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $parentModelId, \ContaoCommunityAlliance\DcGeneral\Clipboard\FilterInterface $filter, array $items) : \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface | \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface[]

Scan for children of a given model.

assembleAllChildrenFrom(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $objModel, string $strDataProvider) : array
This method is ready for mixed hierarchy and will return all children and grandchildren for the given table (or originating table of the model, if no provider name has been given) for all levels and parent child conditions.

Parameters

$objModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model to assemble children from.

$strDataProvider

string

The name of the data provider to fetch children from.

Returns

array

Create a cloned version of the passed model.

createClonedModel(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
The cloning involves clearing of unknown properties, resetting the fallback and clearing properties defined as "doNotCopy".

Parameters

Returns

Create an empty model using the default values from the definition.

createEmptyModelWithDefaults() : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Fetch a certain model from its provider.

fetchModelFromProvider(string|\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId, string|null $providerName) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Parameters

$modelId

string\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface

This is either the id of the model or a serialized id.

$providerName

stringnull

The name of the provider, if this is empty, the id will be deserialized and the provider name will get extracted from there.

Returns

Retrieve the base config for retrieving data.

getBaseConfig(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $parentId) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface
This includes all auxiliary filters from DCA etc. but excludes the filters from panels.
see
deprecated Use EnvironmentInterface::getBaseConfigRegistry->getBaseConfig()

Parameters

Returns

Retrieve a model from the clipboard item.

getModelFromClipboardItem(\ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface $item) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Retrieve models from the clipboard.

getModelsFromClipboard(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $parentModelId) : \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface | \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface[]
This will only return models, that are compatible with the current environment.

Parameters

$parentModelId

\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface

The optional parent id. If not given, the models must not have a parent.

Returns

Retrieve models from the clipboard items.

getModelsFromClipboardItems(array|\ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface[] $items) : \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface | \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface[]

Return all supported languages from the default data data provider.

getSupportedLanguages(mixed $mixID) : array

Parameters

$mixID

mixed

The id of a model for which the languages shall be retrieved.

Returns

array

Handle a action within this environment.

handle(\ContaoCommunityAlliance\DcGeneral\Action $action) : string

Parameters

$action

\ContaoCommunityAlliance\DcGeneral\Action

The action to be executed.

Returns

string

Check if the given model is a root model for the current data definition.

isRootModel(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model) : bool

Parameters

Returns

bool

Paste the content of the clipboard after the given model.

pasteAfter(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $previousModel, \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface $models, string $sortedBy) : void

Parameters

$previousModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model after which to paste.

$sortedBy

string

The name of the sorting property.

Paste the content of the clipboard into the given model.

pasteInto(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $parentModel, \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface $models, string $sortedBy) : void

Parameters

$parentModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model to become the parent model of the clipboard content.

$sortedBy

string

The name of the sorting property.

Paste the content of the clipboard onto the top.

pasteTop(\ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface $models, string $sortedBy, \ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $parentId) : void

Parameters

$sortedBy

string

The name of the sorting property.

Search the parent model for the given model.

searchParentOf(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Parameters

$model

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model for which the parent shall be retrieved.

Returns

Search the parent of the passed model.

searchParentOfIn(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model, \ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface $models) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Set the environment.

setEnvironment(\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment) : \ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface

Set a model as the parent of another model.

setParent(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $childModel, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $parentModel) : \ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface

Apply the root condition of the current data definition to the given model.

setRootModel(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model) : \ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface

Sets all parent condition fields in the destination to the values from the source model.

setSameParent(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $receivingModel, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $sourceModel, string $parentTable) : \ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface
Useful when moving an element after another in a different parent.

Parameters

$receivingModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model that shall get updated.

$sourceModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model that the values shall get retrieved from.

$parentTable

string

The name of the parent table for the models.

Returns

Update the current model from a post request. Additionally, trigger meta palettes, if installed.

updateModelFromPropertyBag(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model, \ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBagInterface $propertyValues) : \ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface