Przeglądaj źródła

Merge pull request #1285 from dantleech/phpcr_fix_2_1

Fixed automatic base route pattern for PHPCR
Thomas 12 lat temu
rodzic
commit
041174991a
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Admin/Admin.php

+ 2 - 2
Admin/Admin.php

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