The palette builder is used to build palette collections, palettes, legends, properties and conditions.
SuppressWarnings | (PHPMD.LongVariable) |
---|
__construct(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container)
\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface
The container for which the palettes shall be built.
addCondition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface $condition, string $scope) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface
The condition to add.
string
The scope.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException |
When an unknown condition type is passed. |
---|
chainDefaultPaletteCondition() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no palette or property has been stored. |
---|
chainPropertyValueCondition(string $propertyName, mixed $propertyValue, bool $strict, string $conjunction) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The name of the property.
mixed
The value of the property.
bool
Flag if the comparison shall be strict (type safe).
string
The conjunction.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If neither a palette nor a property is stored in the builder. |
---|
create(\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface $container) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface
The data definition container for which the palettes shall get built.
createDefaultPaletteCondition() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no palette or property has been stored. |
---|
createLegend(string $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
Name of the legend.
createPalette(string|null $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
null
Only for backwards compatibility, We will remove palette names in the future (deprecated).
createPaletteCollection() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
createProperty(string $propertyName, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface $_) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
SuppressWarnings | (PHPMD.UnusedFormalParameter) |
---|---|
SuppressWarnings | (PHPMD.ShortVariable) |
SuppressWarnings | (PHPMD.CamelCaseParameterName) |
string
The name of the property.
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
Any more subsequent property names to be used.
createPropertyValueCondition(string $propertyName, mixed $propertyValue, bool $strict) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The name of the property.
mixed
The value of the property.
bool
Flag if the comparison shall be strict (type safe).
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If neither a palette nor a property is stored in the builder. |
---|
finishCondition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface $condition) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface
Return the final condition.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If no condition is stored in the builder. |
---|
finishLegend(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
Return the final legend.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no legend is stored in the builder. |
---|
finishPalette(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
Return the final palette.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no palette is stored in the builder. |
---|
finishPaletteCollection(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface $collection) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
Return the final palette collection.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no collection is stored. |
---|
finishProperty(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface[] $property) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface[]
Return the final property or set of properties.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
When no property is stored in the builder. |
---|
getCondition() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface | \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface | null
getContainer() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface
getDefaultPaletteConditionClassName() : string
string
getLegend() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface | null
getLegendClassName() : string
string
getPalette() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface | null
getPaletteClassName() : string
string
getPaletteCollection() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface | null
getPaletteCollectionClassName() : string
string
getPaletteConditionChainClassName() : string
string
getPalettePropertyValueConditionClassName() : string
string
getProperty() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface | null
getPropertyClassName() : string
string
getPropertyConditionChainClassName() : string
string
getPropertyValueConditionClassName() : string
string
setDefaultPaletteConditionClassName(string $defaultPaletteConditionClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setLegendClassName(string $legendClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPaletteClassName(string $paletteClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPaletteCollectionClassName(string $paletteCollectionClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPaletteConditionChainClassName(string $paletteConditionChainClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPalettePropertyValueConditionClassName(string $palettePropertyValueConditionClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPropertyClassName(string $propertyClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPropertyConditionChainClassName(string $propertyConditionChainClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
setPropertyValueConditionClassName(string $propertyValueConditionClassName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The class name.
useLegend(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
usePalette(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
The palette to reuse.
usePaletteCollection(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface $paletteCollection) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface
The palette collection to reuse.
useProperty(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface $property, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface $_) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
SuppressWarnings | (PHPMD.UnusedFormalParameter) |
---|---|
SuppressWarnings | (PHPMD.ShortVariable) |
SuppressWarnings | (PHPMD.CamelCaseParameterName) |
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
The first property.
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
Any more subsequent properties to be used.
addPaletteCondition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface $condition) : void
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface
The condition to add.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If the palette is missing. |
---|
addPropertyCondition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface $condition, string $scope) : void
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface
The condition to add.
string
The scope.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If the the property is missing. |
---|
createPaletteConditionChain() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
createPropertyConditionChain(string $conjunction) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\PaletteBuilder
string
The conjunction to use (defaults to AND).
dispatchEvent(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\Event\BuilderEvent $event) : void
internal | |
---|---|
SuppressWarnings | (PHPMD.Superglobals) |
SuppressWarnings | (PHPMD.CamelCaseVariableName) |
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Builder\Event\BuilderEvent
The event to dispatch.
$condition : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface | \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface | \ContaoCommunityAlliance\DcGeneral\DataDefinition\ConditionChainInterface | null
$container : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface
$defaultPaletteConditionClassName : string
$legend : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface | null
$legendClassName : string
$palette : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface | null
$paletteClassName : string
$paletteCollection : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteCollectionInterface | null
$paletteCollectionClassName : string
$paletteConditionChainClassName : string
$palettePropertyValueConditionClass : \ReflectionClass
$palettePropertyValueConditionClassName : string
$property : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface | null
$propertyClassName : string
$propertyConditionChainClassName : string
$propertyValueConditionClassName : string
EDITABLE
VISIBLE