Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • DefaultBasicDefinition
  • DefaultDataProviderDefinition
  • DefaultModelRelationshipDefinition
  • DefaultPalettesDefinition
  • DefaultPropertiesDefinition

Interfaces

  • BasicDefinitionInterface
  • DataProviderDefinitionInterface
  • DefinitionInterface
  • ModelRelationshipDefinitionInterface
  • PalettesDefinitionInterface
  • PropertiesDefinitionInterface
  • ViewDefinitionInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Interface BasicDefinitionInterface

This interface describes the basic information about the data definition.

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface implements DcGeneral\DataDefinition\Definition\DefinitionInterface

Direct known implementers

DcGeneral\DataDefinition\Definition\DefaultBasicDefinition
Namespace: DcGeneral\DataDefinition\Definition
Package: DcGeneral\DataDefinition\Definition
Located at DataDefinition/Definition/BasicDefinitionInterface.php
Methods summary
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setMode( integer $mode )

Set the mode the data definition is in.

Set the mode the data definition is in.

Parameters

$mode
integer
$mode See the constants in this interface. The mode should either be DcGeneral\DataDefinition\Definition\BasicDefinitionInterface::MODE_FLAT or DcGeneral\DataDefinition\Definition\BasicDefinitionInterface::MODE_HIERARCHICAL.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public integer
# getMode( )

Get the mode the data definition is in.

Get the mode the data definition is in.

Returns

integer
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setRootDataProvider( string $providerName )

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

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

Be aware that there may be any number of in-between data sources, depending on the defined ParentChildConditions

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

Parameters

$providerName
string
$providerName The name of the data provider of the root elements.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public string
# getRootDataProvider( )

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

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

Be aware that there may be any number of in-between data sources, depending on the defined ParentChildConditions

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

Returns

string
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setParentDataProvider( string $providerName )

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

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

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

Parameters

$providerName
string
$providerName The name of the data provider of the parent element.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public string
# getParentDataProvider( )

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

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

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

Returns

string
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setDataProvider( string $providerName )

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

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

Parameters

$providerName
string
$providerName The name of the data provider of the elements being processed.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public string
# getDataProvider( )

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

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

Returns

string
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setAdditionalFilter( string $dataProvider, array $filter )

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

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

Parameters

$dataProvider
string
$dataProvider The name of the data provider for which additional filters shall be passed.
$filter
array
$filter Array of filter rules.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public boolean
# hasAdditionalFilter( string $dataProvider = null )

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

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

Parameters

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

Returns

boolean
public array
# getAdditionalFilter( string $dataProvider = null )

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

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

Parameters

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

Returns

array
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setClosed( boolean $value )

If true, adding of further records is prohibited.

If true, adding of further records is prohibited.

Parameters

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

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface

Todo

isn't this a candidate for deprecation? See BasicDefinitionInterface::setCreatable().
public boolean
# isClosed( )

Boolean flag determining if this data container is closed.

Boolean flag determining if this data container is closed.

True means, there may not be any records added or deleted, false means there may be any record appended or deleted..

Returns

boolean

Todo

isn't this a candidate for deprecation? See BasicDefinitionInterface::isCreatable().
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setEditable( boolean $value )

Boolean flag determining if this data container is editable.

Boolean flag determining if this data container is editable.

Parameters

$value
boolean
$value True means, the data records may be edited.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public boolean
# isEditable( )

Boolean flag determining if this data container is editable.

Boolean flag determining if this data container is editable.

True means, the data records may be edited.

Returns

boolean
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setDeletable( boolean $value )

Set boolean flag determining if this data container is deletable.

Set boolean flag determining if this data container is deletable.

Parameters

$value
boolean
$value True means, the data records may be deleted.

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public boolean
# isDeletable( )

Boolean flag determining if this data container is deletable.

Boolean flag determining if this data container is deletable.

True means, the data records may be deleted.

Returns

boolean
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setCreatable( boolean $value )

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

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

Parameters

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

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public boolean
# isCreatable( )

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

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

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

Returns

boolean
public DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
# setSwitchToEditEnabled( boolean $switchToEditEnabled )

Determines if the view shall switch automatically into edit mode.

Determines if the view shall switch automatically into edit mode.

This most likely only affects parenting modes like trees etc.

Parameters

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

Returns

DcGeneral\DataDefinition\Definition\BasicDefinitionInterface
public boolean
# isSwitchToEditEnabled( )

Determines if the view shall switch automatically into edit mode.

Determines if the view shall switch automatically into edit mode.

This most likely only affects parenting modes like trees etc.

Returns

boolean
Constants summary
string NAME 'basic'
#

The name of the definition.

The name of the definition.

integer MODE_FLAT 0
#

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

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

integer MODE_PARENTEDLIST 1
#

Hierarchical mode. The models span over various levels.

Hierarchical mode. The models span over various levels.

integer MODE_HIERARCHICAL 2
#

Hierarchical mode. The models span over various levels.

Hierarchical mode. The models span over various levels.

contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0