A palette contains a set of properties, grouped by legends.
__clone() : void
addLegend(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $before) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
The legend before which the new legend shall be inserted (optional).
addLegends(array|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface[] $legends, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $before) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
array
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface[]
The legends.
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
The legend before which the new legends shall be inserted (optional).
clearLegends() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
containsLegend(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend) : bool
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
The legend to be checked.
bool
getCondition() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface | null
getEditableProperties(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface|null $model, \ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag $input) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface[]
\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
null
If given, selectors will be evaluated depending on the model.
\ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag
If given, selectors will be evaluated depending on the input data.
getLegend(string $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
string
The name of the legend to search for.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
Is thrown if there is no legend found. |
---|
getLegends() : array | \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface[]
getName() : string
deprecated | Only for backwards compatibility, we will remove palette names in the future! |
---|
string
getProperties(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface|null $model, \ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag $input) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface[]
\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
null
If given, selectors will be evaluated depending on the model.
\ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag
If given, selectors will be evaluated depending on the input data.
getProperty(string $propertyName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
string
The property name.
\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException |
If the this palette does not contain the property. |
---|
getVisibleProperties(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface|null $model, \ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag $input) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface[]
\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
null
If given, selectors will be evaluated depending on the model.
\ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag
If given, selectors will be evaluated depending on the input data.
hasLegend(string $name) : bool
string
The name of the legend to search for.
bool
removeLegend(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
The legend to remove.
setCondition(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface|null $condition) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Palette\PaletteConditionInterface
null
The condition to be bound to this palette.
setLegends(array|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface[] $legends) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
array
\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface[]
The legends.
setName(string $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface
deprecated | Only for backwards compatibility, we will remove palette names in the future! |
---|
string
The name.