public function getSubscribedSystems(ClassMetadata $metadata, $eventName)
    {
        $invoke = self::INVOKE_NONE;

        if ($metadata && isset($metadata->lifecycleCallbacks[$eventName])) {
            $invoke |= self::INVOKE_CALLBACKS;
        }

        /*
         * Not implemented for phpcr-odm at the moment.
         *
        if (isset($metadata->documentListeners[$eventName])) {
            $invoke |= self::INVOKE_LISTENERS;
        }
        */

        if ($this->eventManager->hasListeners($eventName)) {
            $invoke |= self::INVOKE_MANAGER;
        }

        return $invoke;
    }