Prechádzať zdrojové kódy

Merge pull request #800 from benlumley/2.0

buildShow correctly detects and avoids entering a loop, in line with other buildXXX methods.
Thomas 13 rokov pred
rodič
commit
d77a997337
1 zmenil súbory, kde vykonal 2 pridanie a 4 odobranie
  1. 2 4
      Admin/Admin.php

+ 2 - 4
Admin/Admin.php

@@ -610,8 +610,8 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
             return;
         }
 
-        $collection = new FieldDescriptionCollection();
-        $mapper = new ShowMapper($this->showBuilder, $collection, $this);
+        $this->show = new FieldDescriptionCollection();
+        $mapper = new ShowMapper($this->showBuilder, $this->show, $this);
 
         $this->configureShowField($mapper); // deprecated, use configureShowFields instead
         $this->configureShowFields($mapper);
@@ -619,8 +619,6 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
         foreach ($this->getExtensions() as $extension) {
             $extension->configureShowFields($mapper);
         }
-
-        $this->show = $collection;
     }
 
     /**