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 Legend

Default implementation of a legend.

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

Create a new instance.

Create a new instance.

Parameters

$name
string
$name The name of the legend.
public DcGeneral\DataDefinition\Palette\LegendInterface
# setPalette( DcGeneral\DataDefinition\Palette\PaletteInterface $palette = null )

Return the palette this legend belongs to.

Return the palette this legend belongs to.

Parameters

$palette
DcGeneral\DataDefinition\Palette\PaletteInterface|null
$palette The palette.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::setPalette()
public DcGeneral\DataDefinition\Palette\PaletteInterface|null
# getPalette( )

Return the palette this legend belongs to.

Return the palette this legend belongs to.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface|null

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::getPalette()
public DcGeneral\DataDefinition\Palette\LegendInterface
# setName( string $name )

Set the name of this legend (e.g. "title", not "title_legend").

Set the name of this legend (e.g. "title", not "title_legend").

Parameters

$name
string
$name The name.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

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

Return the name of this legend (e.g. "title", not "title_legend").

Return the name of this legend (e.g. "title", not "title_legend").

Returns

string

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::getName()
public boolean
# setInitialVisibility( boolean $value )

Set if this legend's initial state is visible (expanded).

Set if this legend's initial state is visible (expanded).

Parameters

$value
boolean
$value The visibility state.

Returns

boolean

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::setInitialVisibility()
public DcGeneral\DataDefinition\Palette\LegendInterface
# isInitialVisible( )

Determine if this legend's initial state shall be expanded.

Determine if this legend's initial state shall be expanded.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::isInitialVisible()
public DcGeneral\DataDefinition\Palette\LegendInterface
# clearProperties( )

Clear all properties from this legend.

Clear all properties from this legend.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::clearProperties()
public DcGeneral\DataDefinition\Palette\LegendInterface
# setProperties( array $properties )

Set the properties of this legend.

Set the properties of this legend.

Parameters

$properties
array|DcGeneral\DataDefinition\Palette\PropertyInterface[]
$properties The properties.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::setProperties()
public DcGeneral\DataDefinition\Palette\LegendInterface
# addProperties( array $properties, DcGeneral\DataDefinition\Palette\PropertyInterface $before = null )

Add all properties to this legend.

Add all properties to this legend.

Parameters

$properties
array|DcGeneral\DataDefinition\Palette\PropertyInterface[]
$properties The properties.
$before
DcGeneral\DataDefinition\Palette\PropertyInterface
$before The property before the passed properties shall be inserted (optional).

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::addProperties()
public DcGeneral\DataDefinition\Palette\LegendInterface
# addProperty( DcGeneral\DataDefinition\Palette\PropertyInterface $property, DcGeneral\DataDefinition\Palette\PropertyInterface $before = null )

Add a property to this legend.

Add a property to this legend.

Parameters

$property
DcGeneral\DataDefinition\Palette\PropertyInterface
$property The property.
$before
DcGeneral\DataDefinition\Palette\PropertyInterface
$before The property before the passed property shall be inserted (optional).

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
When the property passed as $before can not be found.

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::addProperty()
public DcGeneral\DataDefinition\Palette\LegendInterface
# removeProperty( DcGeneral\DataDefinition\Palette\PropertyInterface $property )

Remove a property from this legend.

Remove a property from this legend.

Parameters

$property
DcGeneral\DataDefinition\Palette\PropertyInterface
$property The property.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface

Implementation of

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

Get all properties in this legend.

Get all properties in this legend.

Parameters

$model
DcGeneral\Data\ModelInterface|null
$model If given, subpalettes will be evaluated depending on the model. If no model is given, all properties will be returned, including subpalette properties.
$input
DcGeneral\Data\PropertyValueBag
$input If given, subpalettes will be evaluated depending on the input data. If no model and no input data is given, all properties will be returned, including subpalette properties.

Returns

DcGeneral\DataDefinition\Palette\PropertyInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::getProperties()
public
# __clone( )

Create a deep clone of the legend.

Create a deep clone of the legend.

Implementation of

DcGeneral\DataDefinition\Palette\LegendInterface::__clone()
Properties summary
protected DcGeneral\DataDefinition\Palette\PaletteInterface|null $palette null
#

The palette this legend belongs to.

The palette this legend belongs to.

protected string $name ''
#

The name of this legend.

The name of this legend.

protected boolean $initiallyVisible true
#

Determinator if this legend is initially expanded.

Determinator if this legend is initially expanded.

protected DcGeneral\DataDefinition\Palette\PropertyInterface[]|array $properties array()
#

The properties in this legend.

The properties in this legend.

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