Example #1
0
 public function mergeConfig(Config $config)
 {
     foreach ($config->getForms() as $form) {
         if (!$this->hasForm($form->getName())) {
             $this->addForm($form);
         }
     }
     foreach ($config->getLoops() as $loop) {
         if (!$this->hasLoop($loop->getName())) {
             $this->addLoop($loop);
         }
     }
     foreach ($config->getServices() as $service) {
         if (!$this->hasService($service->getId())) {
             $this->addService($service);
         }
     }
     foreach ($config->getHooks() as $hook) {
         if (!$this->hasHook($hook->getId())) {
             $this->addHook($hook);
         }
     }
 }