public function getEventNamePrefix($entity)
    {
        if (is_object($entity)) {
            $eventPrefix = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', get_class($entity)).'.');
        } else {
            $eventPrefix = strtolower(str_replace(NAMESPACE_SEPARATOR, '.', $entity).'.');
        }
        if ($entity instanceof \Doctrine\ORM\Proxy\Proxy) {
            $prefix = str_replace(NAMESPACE_SEPARATOR, '.', $this->application->getEntityManager()->getConfiguration()->getProxyNamespace());
            $prefix .= '.'.$entity::MARKER.'.';

            $eventPrefix = str_replace(strtolower($prefix), '', $eventPrefix);
        }

        $eventPrefix = str_replace(array('backbee.', 'classcontent.'), array('', ''), $eventPrefix);

        return $eventPrefix;
    }