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 PaletteFactory

The palette factory.

Namespace: DcGeneral\DataDefinition\Palette
Deprecated: This class is deprecated for the moment, use the PaletteBuilder instead.
Located at DataDefinition/Palette/PaletteFactory.php
Methods summary
public static DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
# createPaletteCollection( array|DcGeneral\DataDefinition\Palette\PaletteInterface $palettes, DcGeneral\DataDefinition\Palette\PaletteInterface $_ = null )

Create a new palette collection from a list of palettes.

Create a new palette collection from a list of palettes.

Parameters

$palettes
array|DcGeneral\DataDefinition\Palette\PaletteInterface
$palettes A list of palettes. Can be multiple arrays and arrays of arrays.
$_
DcGeneral\DataDefinition\Palette\PaletteInterface
$_ A list of palettes. Can be multiple arrays and arrays of arrays.

Returns

DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
public static
# fillPaletteCollection( DcGeneral\DataDefinition\Palette\PaletteCollection $collection, array $palettes )

Fill a palette collection from a multidimensional array of palettes.

Fill a palette collection from a multidimensional array of palettes.

Parameters

$collection
DcGeneral\DataDefinition\Palette\PaletteCollection
$collection The collection.
$palettes
array
$palettes The palettes to fill.

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
When an invalid palette has been passed.
public static DcGeneral\DataDefinition\Palette\PaletteInterface
# createPalette( string $name = null, array $legend = null, array $_ = null )

Create a new palette from a list of legends.

Create a new palette from a list of legends.

Parameters

$name
string
$name The name of the palette, can be omitted (deprecated).
$legend
array
$legend A list of legends. Can be multiple arrays and arrays of arrays.
$_
array
$_ A list of legends. Can be multiple arrays and arrays of arrays.

Returns

DcGeneral\DataDefinition\Palette\PaletteInterface
public static
# fillPalette( DcGeneral\DataDefinition\Palette\PaletteInterface $palette, array $legends )

Fill a palette from a multidimensional array of legends.

Fill a palette from a multidimensional array of legends.

Parameters

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

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
When an invalid legend has been passed.
public static DcGeneral\DataDefinition\Palette\LegendInterface
# createLegend( string $name, array|DcGeneral\DataDefinition\Palette\PropertyInterface $property = null, DcGeneral\DataDefinition\Palette\PropertyInterface $_ = null )

Create a new legend from a list of properties.

Create a new legend from a list of properties.

Parameters

$name
string
$name The name of the legend.
$property
array|DcGeneral\DataDefinition\Palette\PropertyInterface
$property A list of properties. Can be multiple arrays and arrays of arrays.
$_
DcGeneral\DataDefinition\Palette\PropertyInterface
$_ A list of properties. Can be multiple arrays and arrays of arrays.

Returns

DcGeneral\DataDefinition\Palette\LegendInterface
public static
# fillLegend( DcGeneral\DataDefinition\Palette\LegendInterface $legend, array $properties )

Fill a legend from a multidimensional array of properties.

Fill a legend from a multidimensional array of properties.

Parameters

$legend
DcGeneral\DataDefinition\Palette\LegendInterface
$legend The legend.
$properties
array
$properties The properties.

Throws

DcGeneral\Exception\DcGeneralInvalidArgumentException
When an invalid property is encountered.
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0