Explorar o código

Merge remote-tracking branch 'willdurant/master'

Thomas Rabaix %!s(int64=14) %!d(string=hai) anos
pai
achega
2060ed489f
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      Admin/Admin.php

+ 3 - 3
Admin/Admin.php

@@ -547,7 +547,7 @@ abstract class Admin implements AdminInterface
     public function getBaseRoutePattern()
     {
         if (!$this->baseRoutePattern) {
-            preg_match('@([A-Za-z]*)\\\([A-Za-z]*)Bundle\\\(Entity|Document)\\\(.*)@', $this->getClass(), $matches);
+            preg_match('@([A-Za-z0-9]*)\\\([A-Za-z0-9]*)Bundle\\\(Entity|Document|Model)\\\(.*)@', $this->getClass(), $matches);
 
             if (!$matches) {
                 throw new \RuntimeException(sprintf('Please define a default `baseRoutePattern` value for the admin class `%s`', get_class($this)));
@@ -580,7 +580,7 @@ abstract class Admin implements AdminInterface
     public function getBaseRouteName()
     {
         if (!$this->baseRouteName) {
-            preg_match('@([A-Za-z]*)\\\([A-Za-z]*)Bundle\\\(Entity|Document)\\\(.*)@', $this->getClass(), $matches);
+            preg_match('@([A-Za-z0-9]*)\\\([A-Za-z0-9]*)Bundle\\\(Entity|Document|Model)\\\(.*)@', $this->getClass(), $matches);
 
             if (!$matches) {
                 throw new \RuntimeException(sprintf('Please define a default `baseRouteName` value for the admin class `%s`', get_class($this)));
@@ -1784,4 +1784,4 @@ abstract class Admin implements AdminInterface
     {
         $this->modelManager = $modelManager;
     }
-}
+}