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

Interface PaletteInterface

A palette contains a set of properties, grouped by legends.

Direct known implementers

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

Set the name of this palette.

Set the name of this palette.

Deprecated

Only for backwards compatibility, we will remove palette names in the future!

Parameters

$name
string
$name The name.

Returns

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

Return the name of this palette.

Return the name of this palette.

Deprecated

Only for backwards compatibility, we will remove palette names in the future!

Returns

string
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[]
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[]
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[]
public DcGeneral\DataDefinition\Palette\PaletteInterface
# clearLegends( )

Clear all legends from this palette.

Clear all legends from this palette.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface
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
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
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
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
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
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
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
Is thrown if there is no legend found.
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[]
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
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
public
# __clone( )

Create a deep clone of the palette.

Create a deep clone of the palette.

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