src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/LanguageOptionsListener.php
protected function wantToHandle(GetOptionsEvent $event)
    {
        if ($event->getOptions() !== null) {
            return false;
        }

        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return false;
        }

        $environment = $event->getEnvironment();
        if ('tl_metamodel' !== $environment->getDataDefinition()->getName()) {
            return false;
        }

        if ($event->getEnvironment()->getDataDefinition()->getName() !== $event->getModel()->getProviderName()) {
            return false;
        }

        return ('languages' === $event->getPropertyName()) && ('langcode' === $event->getSubPropertyName());
    }
protected function wantToHandle(GetOptionsEvent $event)
    {
        if ($event->getOptions() !== null) {
            return false;
        }

        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return false;
        }

        $environment = $event->getEnvironment();
        if ('tl_metamodel' !== $environment->getDataDefinition()->getName()) {
            return false;
        }

        if ($event->getEnvironment()->getDataDefinition()->getName() !== $event->getModel()->getProviderName()) {
            return false;
        }

        return ('languages' === $event->getPropertyName()) && ('langcode' === $event->getSubPropertyName());
    }
Test if the event is for the correct table and in backend scope.

@param GetOptionsEvent $event The event to test.

@return bool