Beispiel #1
0
 /**
  * Unregister a provider bundle with persistence.
  *
  * @param Zikula_HookManager_ProviderBundle $bundle
  */
 public function unregisterProviderBundle(Zikula_HookManager_ProviderBundle $bundle)
 {
     $this->storage->unregisterProviderByArea($bundle->getArea());
     $this->reload();
 }
Beispiel #2
0
 /**
  * Register a hook subscriber bundle.
  *
  * @param Zikula_HookManager_ProviderBundle $bundle HookProviderBundle.
  *
  * @return Zikula_AbstractVersion
  */
 public function registerHookProviderBundle(Zikula_HookManager_ProviderBundle $bundle)
 {
     if (array_key_exists($bundle->getArea(), $this->hookProviderBundles)) {
         throw new InvalidArgumentException(sprintf('Area %s is already registered', $bundle->getArea()));
     }
     $this->hookProviderBundles[$bundle->getArea()] = $bundle;
     return $this;
 }