src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PaletteBuilder.php
private function getOrCreatePaletteDefinition(IMetaModelDataDefinition $container)
    {
        if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {
            return $container->getDefinition(PalettesDefinitionInterface::NAME);
        }
        $container->setDefinition(
            PalettesDefinitionInterface::NAME,
            $palettesDefinition = new DefaultPalettesDefinition()
        );

        return $palettesDefinition;
    }
private function getOrCreatePaletteDefinition(IMetaModelDataDefinition $container)
    {
        if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {
            return $container->getDefinition(PalettesDefinitionInterface::NAME);
        }
        $container->setDefinition(
            PalettesDefinitionInterface::NAME,
            $palettesDefinition = new DefaultPalettesDefinition()
        );

        return $palettesDefinition;
    }
Retrieve or create the palette definition.

@param IMetaModelDataDefinition $container The container.

@return DefaultPalettesDefinition|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\DefinitionInterface