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

  • Legend
  • Palette
  • PaletteCollection
  • PaletteFactory
  • Property

Interfaces

  • LegendInterface
  • PaletteCollectionInterface
  • PaletteInterface
  • PropertyInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class Palette

Default implementation of a palette.

DcGeneral\DataDefinition\Palette\Palette implements DcGeneral\DataDefinition\Palette\PaletteInterface
Namespace: DcGeneral\DataDefinition\Palette
Located at DataDefinition/Palette/Palette.php
Methods summary
public DcGeneral\DataDefinition\Palette\PaletteInterface
# setName( string $name )

Set the name of this palette.

Set the name of this palette.

Parameters

$name
string
$name The name.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::setName()
public string
# getName( )

Return the name of this palette.

Return the name of this palette.

Returns

string

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getName()
public DcGeneral\DataDefinition\Palette\PropertyInterface[]
# getProperties( DcGeneral\Data\ModelInterface $model = null, DcGeneral\Data\PropertyValueBag $input = null )

Get all properties from all legends in this palette.

Get all properties from all legends in this palette.

Parameters

$model
DcGeneral\Data\ModelInterface|null
$model If given, selectors will be evaluated depending on the model.
$input
DcGeneral\Data\PropertyValueBag
$input If given, selectors will be evaluated depending on the input data.

Returns

DcGeneral\DataDefinition\Palette\PropertyInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getProperties()
public DcGeneral\DataDefinition\Palette\PropertyInterface[]
# getVisibleProperties( DcGeneral\Data\ModelInterface $model = null, DcGeneral\Data\PropertyValueBag $input = null )

Get all properties from all legends in this palette that are visible.

Get all properties from all legends in this palette that are visible.

Parameters

$model
DcGeneral\Data\ModelInterface|null
$model If given, selectors will be evaluated depending on the model.
$input
DcGeneral\Data\PropertyValueBag
$input If given, selectors will be evaluated depending on the input data.

Returns

DcGeneral\DataDefinition\Palette\PropertyInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getVisibleProperties()
public DcGeneral\DataDefinition\Palette\PropertyInterface[]
# getEditableProperties( DcGeneral\Data\ModelInterface $model = null, DcGeneral\Data\PropertyValueBag $input = null )

Get all properties from all legends in this palette that are editable.

Get all properties from all legends in this palette that are editable.

Parameters

$model
DcGeneral\Data\ModelInterface|null
$model If given, selectors will be evaluated depending on the model.
$input
DcGeneral\Data\PropertyValueBag
$input If given, selectors will be evaluated depending on the input data.

Returns

DcGeneral\DataDefinition\Palette\PropertyInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getEditableProperties()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# clearLegends( )

Clear all legends from this palette.

Clear all legends from this palette.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::clearLegends()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# setLegends( array $legends )

Set all legends to this palette.

Set all legends to this palette.

Parameters

$legends
array|DcGeneral\DataDefinition\Palette\LegendInterface[]
$legends The legends.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::setLegends()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# addLegends( array $legends, DcGeneral\DataDefinition\Palette\LegendInterface $before = null )

Add all legends to this palette.

Add all legends to this palette.

Parameters

$legends
array|DcGeneral\DataDefinition\Palette\LegendInterface[]
$legends The legends.
$before
DcGeneral\DataDefinition\Palette\LegendInterface
$before The legend before which the new legends shall be inserted (optional).

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::addLegends()
public boolean
# hasLegend( string $name )

Determine if a legend with the given name exists in this palette.

Determine if a legend with the given name exists in this palette.

Parameters

$name
string
$name The name of the legend to search for.

Returns

boolean

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::hasLegend()
public boolean
# containsLegend( DcGeneral\DataDefinition\Palette\LegendInterface $legend )

Determine if a legend exists in this palette.

Determine if a legend exists in this palette.

Parameters

$legend
DcGeneral\DataDefinition\Palette\LegendInterface
$legend The legend to be checked.

Returns

boolean

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::containsLegend()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# addLegend( DcGeneral\DataDefinition\Palette\LegendInterface $legend, DcGeneral\DataDefinition\Palette\LegendInterface $before = null )

Add a legend to this palette.

Add a legend to this palette.

Parameters

$legend
DcGeneral\DataDefinition\Palette\LegendInterface
$legend The legend to add.
$before
DcGeneral\DataDefinition\Palette\LegendInterface
$before The legend before which the new legend shall be inserted (optional).

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
when the legend passed as $before can not be found.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::addLegend()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# removeLegend( DcGeneral\DataDefinition\Palette\LegendInterface $legend )

Remove a legend from this palette.

Remove a legend from this palette.

Parameters

$legend
DcGeneral\DataDefinition\Palette\LegendInterface
$legend The legend to remove.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::removeLegend()
public DcGeneral\DataDefinition\Palette\LegendInterface
# getLegend( string $name )

Return the legend with the given name.

Return the legend with the given name.

Parameters

$name
string
$name The name of the legend to search for.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Throws

DcGeneral\Exception\DcGeneralRuntimeException
When the legend does not exist.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getLegend()
public array|DcGeneral\DataDefinition\Palette\LegendInterface[]
# getLegends( )

Return the legends from this palette.

Return the legends from this palette.

Returns

array|DcGeneral\DataDefinition\Palette\LegendInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getLegends()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# setCondition( DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface $condition = null )

Set the condition bound to this palette.

Set the condition bound to this palette.

Parameters

$condition
DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|null
$condition The condition to be bound to this palette.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::setCondition()
public DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|null
# getCondition( )

Get the condition bound to this palette.

Get the condition bound to this palette.

Returns

DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|null

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::getCondition()
public
# __clone( )

Create a deep clone of the palette.

Create a deep clone of the palette.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteInterface::__clone()
Properties summary
protected string $name null
#

The name of this palette.

The name of this palette.

Deprecated

Only for backwards compatibility, we will remove palette names in the future!
protected array|DcGeneral\DataDefinition\Palette\LegendInterface[] $legends array()
#

List of all legends in this palette.

List of all legends in this palette.

protected DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|null $condition null
#

The condition bound to this palette.

The condition bound to this palette.

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