This interface describes the basic information about the data definition.

 Methods

Get the additional filters to be used for retrieving elements for the view.

getAdditionalFilter(string $dataProvider) : array

Parameters

$dataProvider

string

The name of the data provider for which additional filters shall be retrieved.

Returns

array

Retrieve the name of data provider which holds the models that we work on.

getDataProvider() : string

Returns

string

Get the mode the data definition is in.

getMode() : int

Returns

int

Retrieve the name of data provider that holds the parent model.

getParentDataProvider() : string
Note: This does only apply when in tree mode or parenting mode. For flat mode this does not make sense.

Returns

string

Retrieve the name of data provider that holds the models for the root level.

getRootDataProvider() : string
Be aware that there may be any number of in-between data sources, depending on the defined {@link ParentChildCondition}s Note: This does only apply when in tree mode or parenting mode. For flat mode this does not make sense.

Returns

string

Get the ids of the root elements (only valid when in hierarchical mode).

getRootEntries() : mixed[]

Returns

mixed[]

Determine if additional filters are set for the given data provider.

hasAdditionalFilter(string $dataProvider) : bool

Parameters

$dataProvider

string

The name of the data provider for which additional filters shall be checked.

Returns

bool

Boolean flag determining if this data container is closed.

isClosed() : bool
True means, there may not be any records added or deleted, false means there may be any record appended or deleted..
deprecated Use isEditable, isDeletable or isCreatable instead.

Returns

bool

Determines if new entries may be created within this data container.

isCreatable() : bool
True means new entries may be created, false prohibits creation of new entries.

Returns

bool

Boolean flag determining if this data container is deletable.

isDeletable() : bool
True means, the data records may be deleted.

Returns

bool

Boolean flag determining if this data container is in edit only mode.

isEditOnlyMode() : bool
True means, that only the edit mode will shown, irrespective of the given action.

Returns

bool

Boolean flag determining if this data container is editable.

isEditable() : bool
True means, the data records may be edited.

Returns

bool

Determines if the view shall switch automatically into edit mode.

isSwitchToEditEnabled() : bool
This most likely only affects parenting modes like trees etc.

Returns

bool

Set the additional filters to be used for retrieving elements for the view.

setAdditionalFilter(string $dataProvider, array $filter) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Parameters

$dataProvider

string

The name of the data provider for which additional filters shall be passed.

$filter

array

Array of filter rules.

Returns

If true, adding of further records is prohibited.

setClosed(bool $value) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
deprecated Use setEditable, setDeletable or setCreatable instead.

Parameters

$value

bool

The flag - true means prohibit element creation, false means allow creation of new elements.

Returns

Determines if new entries may be created within this data container.

setCreatable(bool $value) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Parameters

$value

bool

True means new entries may be created, false prohibits creation of new entries.

Returns

Set the name of the data provider which holds the models that we work on.

setDataProvider(string $providerName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Parameters

$providerName

string

The name of the data provider of the elements being processed.

Returns

Set boolean flag determining if this data container is deletable.

setDeletable(bool $value) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Parameters

$value

bool

True means, the data records may be deleted.

Returns

If true, only the edit mode will be shown.

setEditOnlyMode(bool $value) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
This is more or less the opposite to BasicDefinitionInterface::isEditable().

Parameters

$value

bool

The flag - true means that only the edit mode will shown, irrespective of the given action.

Returns

Boolean flag determining if this data container is editable.

setEditable(bool $value) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
This is more or less the opposite to BasicDefinitionInterface::isEditOnlyMode().

Parameters

$value

bool

True means, the data records may be edited.

Returns

Set the mode the data definition is in.

setMode(int $mode) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Parameters

$mode

int

See the constants in this interface. The mode should either be {@link BasicDefinitionInterface::MODE_FLAT} or {@link BasicDefinitionInterface::MODE_HIERARCHICAL}.

Returns

Set the name of the data provider that holds the parent model.

setParentDataProvider(string $providerName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
Note: This does only apply when in tree mode or parenting mode. For flat mode this does not make sense.

Parameters

$providerName

string

The name of the data provider of the parent element.

Returns

Set the name of the data provider that holds the models for the root level.

setRootDataProvider(string $providerName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
Be aware that there may be any number of in-between data sources, depending on the defined {@link ParentChildCondition}s Note: This does only apply when in tree mode or parenting mode. For flat mode this does not make sense.

Parameters

$providerName

string

The name of the data provider of the root elements.

Returns

Set the ids of the root elements (only valid when in hierarchical mode).

setRootEntries(mixed[] $entries) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
The here specified elements will filter the root condition.

Parameters

$entries

mixed[]

The ids of the items to be used as root elements.

Returns

Determines if the view shall switch automatically into edit mode.

setSwitchToEditEnabled(bool $switchToEditEnabled) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
This most likely only affects parenting modes like trees etc.

Parameters

$switchToEditEnabled

bool

The flag - true means switch automatically to editing mode, false allows listing.

Returns

 Constants

 

Flat mode. All models are on the same hierarchical level. No root conditions are defined.

MODE_FLAT 
 

Hierarchical mode. The models span over various levels.

MODE_HIERARCHICAL 
 

Hierarchical mode. The models span over various levels.

MODE_PARENTEDLIST 
 

The name of the definition.

NAME