private function getRegistryRepository()
    {
        $repository = null;
        if (null !== $em = $this->_context->getApplication()->getEntityManager()) {
            $repository = $em->getRepository('BackBee\Bundle\Registry');
        }

        return $repository;
    }