Explorar o código

Merge pull request #1601 from lsmith77/class_utils_get_class

use ClassUtils::getClass() instead of get_class
Thomas %!s(int64=12) %!d(string=hai) anos
pai
achega
e49da42a0b
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Admin/Admin.php

+ 3 - 1
Admin/Admin.php

@@ -45,6 +45,8 @@ use Sonata\AdminBundle\Model\ModelManagerInterface;
 use Knp\Menu\FactoryInterface as MenuFactoryInterface;
 use Knp\Menu\ItemInterface as MenuItemInterface;
 
+use Doctrine\Common\Util\ClassUtils;
+
 abstract class Admin implements AdminInterface, DomainObjectInterface
 {
     const CONTEXT_MENU       = 'menu';
@@ -2564,7 +2566,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
             return (string) $object;
         }
 
-        return sprintf("%s:%s", get_class($object), spl_object_hash($object));
+        return sprintf("%s:%s", ClassUtils::getClass($object), spl_object_hash($object));
     }
 
     /**