MetaModels\DcGeneral\Events\Table\InputScreen\Subscriber::getBackendSections PHP Method

getBackendSections() public method

Retrieve a list of all backend sections, like "content", "system" etc.
public getBackendSections ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void
    public function getBackendSections(GetPropertyOptionsEvent $event)
    {
        if ($event->getEnvironment()->getDataDefinition()->getName() !== 'tl_metamodel_dca' || $event->getPropertyName() !== 'backendsection') {
            return;
        }
        $event->setOptions(array_keys($GLOBALS['BE_MOD']));
    }