src/CoreBundle/EventListener/DcGeneral/Table/Dca/RenderModeOptionListener.php
public function handle(GetPropertyOptionsEvent $event)
    {
        if (('tl_metamodel_dca' !== $event->getEnvironment()->getDataDefinition()->getName())
            || ('rendermode' !== $event->getPropertyName())) {
            return;
        }

        $translator = $event->getEnvironment()->getTranslator();
        $options    = [
            'flat'         => $translator->translate('rendermodes.flat', 'tl_metamodel_dca'),
            'hierarchical' => $translator->translate('rendermodes.hierarchical', 'tl_metamodel_dca'),
        ];

        if ('ctable' === $event->getModel()->getProperty('rendertype')) {
            $options['parented'] = $translator->translate('rendermodes.parented', 'tl_metamodel_dca');
        }

        $event->setOptions($options);
    }
public function handle(GetPropertyOptionsEvent $event)
    {
        if (('tl_metamodel_dca' !== $event->getEnvironment()->getDataDefinition()->getName())
            || ('rendermode' !== $event->getPropertyName())) {
            return;
        }

        $translator = $event->getEnvironment()->getTranslator();
        $options    = [
            'flat'         => $translator->translate('rendermodes.flat', 'tl_metamodel_dca'),
            'hierarchical' => $translator->translate('rendermodes.hierarchical', 'tl_metamodel_dca'),
        ];

        if ('ctable' === $event->getModel()->getProperty('rendertype')) {
            $options['parented'] = $translator->translate('rendermodes.parented', 'tl_metamodel_dca');
        }

        $event->setOptions($options);
    }
Retrieve a list of all backend sections, like "content", "system" etc.

@param GetPropertyOptionsEvent $event The event.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)