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 PaletteCollection

Default implementation of PaletteCollectionInterface.

DcGeneral\DataDefinition\Palette\PaletteCollection implements DcGeneral\DataDefinition\Palette\PaletteCollectionInterface

Direct known subclasses

DcGeneral\DataDefinition\Definition\DefaultPalettesDefinition
Namespace: DcGeneral\DataDefinition\Palette
Located at DataDefinition/Palette/PaletteCollection.php
Methods summary
public DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
# clearPalettes( )

Remove all palettes from this collection.

Remove all palettes from this collection.

Returns

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::clearPalettes()
public DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
# setPalettes( array $palettes )

Set all palettes in this collection.

Set all palettes in this collection.

Parameters

$palettes
array|DcGeneral\DataDefinition\Palette\PaletteInterface[]
$palettes The palettes.

Returns

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::setPalettes()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# addPalettes( array $palettes )

Add multiple palettes to this collection.

Add multiple palettes to this collection.

Parameters

$palettes
array|DcGeneral\DataDefinition\Palette\PaletteInterface[]
$palettes The palettes.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::addPalettes()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# addPalette( DcGeneral\DataDefinition\Palette\PaletteInterface $palette )

Add a palette to this collection.

Add a palette to this collection.

Parameters

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

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::addPalette()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# removePalette( DcGeneral\DataDefinition\Palette\PaletteInterface $palette )

Remove a palette from this collection.

Remove a palette from this collection.

Parameters

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

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::removePalette()
public array|DcGeneral\DataDefinition\Palette\PaletteInterface[]
# getPalettes( )

Return all palettes in this collection.

Return all palettes in this collection.

Returns

array|DcGeneral\DataDefinition\Palette\PaletteInterface[]

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::getPalettes()
public boolean
# hasPalette( DcGeneral\DataDefinition\Palette\PaletteInterface $palette )

Check if a palette exists in this collection.

Check if a palette exists in this collection.

Parameters

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

Returns

boolean

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::hasPalette()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# findPalette( DcGeneral\Data\ModelInterface $model = null, DcGeneral\Data\PropertyValueBag $input = null )

Find the palette matching model and input parameters.

Find the palette matching model and input parameters.

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\PaletteInterface

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
Is thrown if there is no palette found or more than one palette.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::findPalette()
public boolean
# hasPaletteByName( string $paletteName )

Check if a palette for the given name exists in this collection.

Check if a palette for the given name exists in this collection.

Parameters

$paletteName
string
$paletteName The palette name.

Returns

boolean

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::hasPaletteByName()
public DcGeneral\DataDefinition\Palette\PaletteInterface
# getPaletteByName( string $paletteName )

Return the palette for the given name.

Return the palette for the given name.

Parameters

$paletteName
string
$paletteName The palette name.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
Is thrown if there is no palette with this name.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::getPaletteByName()
public
# __clone( )

Create a deep clone of the palette collection.

Create a deep clone of the palette collection.

Implementation of

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface::__clone()
Properties summary
protected array|DcGeneral\DataDefinition\Palette\PaletteInterface[] $palettes array()
#

The palettes contained in the collection.

The palettes contained in the collection.

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