예제 #1
0
 /**
  * @param Extension $extension
  */
 public function bootExtension(Extension $extension)
 {
     $extension->addSubscribers($this->evm, $this->em, $this->reader);
     if (is_array($extension->getFilters())) {
         foreach ($extension->getFilters() as $name => $filter) {
             $this->metadata->addFilter($name, $filter);
             $this->em->getFilters()->enable($name);
         }
     }
 }
예제 #2
0
 /**
  * @param                        $connection
  * @param Extension              $extension
  * @param EntityManagerInterface $em
  * @param EventManager           $evm
  * @param Configuration          $configuration
  */
 protected function bootExtension($connection, Extension $extension, EntityManagerInterface $em, EventManager $evm, Configuration $configuration)
 {
     $extension->addSubscribers($evm, $em, $configuration->getMetadataDriverImpl()->getReader());
     if (is_array($extension->getFilters())) {
         foreach ($extension->getFilters() as $name => $filter) {
             $configuration->addFilter($name, $filter);
             $em->getFilters()->enable($name);
         }
     }
     $this->markAsBooted($connection, $extension);
 }