Exemple #1
0
 /**
  * Define the hook bundles supported by this module.
  *
  * @return void
  */
 protected function setupHookBundles()
 {
     // Subscriber bundles
     $bundle = new SubscriberBundle($this->name, 'subscriber.users.ui_hooks.user', 'ui_hooks', $this->__('User management hooks'));
     $bundle->addEvent('display_view', 'users.ui_hooks.user.display_view');
     $bundle->addEvent('form_edit', 'users.ui_hooks.user.form_edit');
     $bundle->addEvent('validate_edit', 'users.ui_hooks.user.validate_edit');
     $bundle->addEvent('process_edit', 'users.ui_hooks.user.process_edit');
     $bundle->addEvent('form_delete', 'users.ui_hooks.user.form_delete');
     $bundle->addEvent('validate_delete', 'users.ui_hooks.user.validate_delete');
     $bundle->addEvent('process_delete', 'users.ui_hooks.user.process_delete');
     $this->registerHookSubscriberBundle($bundle);
     $bundle = new SubscriberBundle($this->name, 'subscriber.users.ui_hooks.registration', 'ui_hooks', $this->__('Registration management hooks'));
     $bundle->addEvent('display_view', 'users.ui_hooks.registration.display_view');
     $bundle->addEvent('form_edit', 'users.ui_hooks.registration.form_edit');
     $bundle->addEvent('validate_edit', 'users.ui_hooks.registration.validate_edit');
     $bundle->addEvent('process_edit', 'users.ui_hooks.registration.process_edit');
     $bundle->addEvent('form_delete', 'users.ui_hooks.registration.form_delete');
     $bundle->addEvent('validate_delete', 'users.ui_hooks.registration.validate_delete');
     $bundle->addEvent('process_delete', 'users.ui_hooks.registration.process_delete');
     $this->registerHookSubscriberBundle($bundle);
     // Bundle for the login form
     $bundle = new SubscriberBundle($this->name, 'subscriber.users.ui_hooks.login_screen', 'ui_hooks', $this->__('Login form and block hooks'));
     $bundle->addEvent('form_edit', 'users.ui_hooks.login_screen.form_edit');
     $bundle->addEvent('validate_edit', 'users.ui_hooks.login_screen.validate_edit');
     $bundle->addEvent('process_edit', 'users.ui_hooks.login_screen.process_edit');
     $this->registerHookSubscriberBundle($bundle);
     // Bundle for the login block
     $bundle = new SubscriberBundle($this->name, 'subscriber.users.ui_hooks.login_block', 'ui_hooks', $this->__('Login form and block hooks'));
     $bundle->addEvent('form_edit', 'users.ui_hooks.login_block.form_edit');
     $bundle->addEvent('validate_edit', 'users.ui_hooks.login_block.validate_edit');
     $bundle->addEvent('process_edit', 'users.ui_hooks.login_block.process_edit');
     $this->registerHookSubscriberBundle($bundle);
 }
 /**
  * Set up hook subscriber bundle
  */
 protected function setupHookBundles()
 {
     // This enables Scribite 5 connection to HTML e-mail test
     $bundle = new SubscriberBundle($this->name, 'subscriber.mailer.ui_hooks.htmlmail', 'ui_hooks', $this->__('HTML mail hook'));
     $bundle->addEvent('form_edit', 'mailer.ui_hooks.htmlmail.form_edit');
     $this->registerHookSubscriberBundle($bundle);
 }
Exemple #3
0
 /**
  * Register a hook subscriber bundle.
  *
  * @param SubscriberBundle $bundle HookBundle.
  *
  * @return AbstractContainer
  */
 public function registerHookSubscriberBundle(SubscriberBundle $bundle)
 {
     if (array_key_exists($bundle->getArea(), $this->subscriberBundles)) {
         throw new \InvalidArgumentException(sprintf('Area %s is already registered', $bundle->getArea()));
     }
     $this->subscriberBundles[$bundle->getArea()] = $bundle;
     return $this;
 }
Exemple #4
0
 /**
  * Define the hook bundles supported by this module.
  *
  * @return void
  */
 protected function setupHookBundles()
 {
     $bundle = new SubscriberBundle('ZikulaPagesModule', 'subscriber.pages.ui_hooks.pages', 'ui_hooks', $this->__('Pages Hooks'));
     $bundle->addEvent('display_view', 'pages.ui_hooks.pages.display_view');
     $bundle->addEvent('form_edit', 'pages.ui_hooks.pages.form_edit');
     $bundle->addEvent('form_delete', 'pages.ui_hooks.pages.form_delete');
     $bundle->addEvent('validate_edit', 'pages.ui_hooks.pages.validate_edit');
     $bundle->addEvent('validate_delete', 'pages.ui_hooks.pages.validate_delete');
     $bundle->addEvent('process_edit', 'pages.ui_hooks.pages.process_edit');
     $bundle->addEvent('process_delete', 'pages.ui_hooks.pages.process_delete');
     $this->registerHookSubscriberBundle($bundle);
     $bundle = new SubscriberBundle('ZikulaPagesModule', 'subscriber.pages.filter_hooks.pagesfilter', 'filter_hooks', $this->__('Pages Filter Hooks'));
     $bundle->addEvent('filter', 'pages.filter_hooks.pages.filter');
     $this->registerHookSubscriberBundle($bundle);
 }
 /**
  * Define hook subscriber bundles.
  */
 protected function setupHookBundles()
 {
     $bundle = new SubscriberBundle($this->name, 'subscriber.zikularoutesmodule.ui_hooks.routes', 'ui_hooks', $this->__('zikularoutesmodule Routes Display Hooks'));
     // Display hook for view/display templates.
     $bundle->addEvent('display_view', 'zikularoutesmodule.ui_hooks.routes.display_view');
     // Display hook for create/edit forms.
     $bundle->addEvent('form_edit', 'zikularoutesmodule.ui_hooks.routes.form_edit');
     // Display hook for delete dialogues.
     $bundle->addEvent('form_delete', 'zikularoutesmodule.ui_hooks.routes.form_delete');
     // Validate input from an ui create/edit form.
     $bundle->addEvent('validate_edit', 'zikularoutesmodule.ui_hooks.routes.validate_edit');
     // Validate input from an ui create/edit form (generally not used).
     $bundle->addEvent('validate_delete', 'zikularoutesmodule.ui_hooks.routes.validate_delete');
     // Perform the final update actions for a ui create/edit form.
     $bundle->addEvent('process_edit', 'zikularoutesmodule.ui_hooks.routes.process_edit');
     // Perform the final delete actions for a ui form.
     $bundle->addEvent('process_delete', 'zikularoutesmodule.ui_hooks.routes.process_delete');
     $this->registerHookSubscriberBundle($bundle);
     $bundle = new SubscriberBundle($this->name, 'subscriber.zikularoutesmodule.filter_hooks.routes', 'filter_hooks', $this->__('zikularoutesmodule Routes Filter Hooks'));
     // A filter applied to the given area.
     $bundle->addEvent('filter', 'zikularoutesmodule.filter_hooks.routes.filter');
     $this->registerHookSubscriberBundle($bundle);
 }
 /**
  * Define the hook bundles supported by this module.
  *
  * @return void
  */
 protected function setupHookBundles()
 {
     $bundle = new SubscriberBundle('KaikmediaGalleryModule', 'subscriber.kaikmediagallery.ui_hooks.media', 'ui_hooks', $this->__('Media Hooks'));
     $bundle->addEvent('display_view', 'kaikmediagallery.ui_hooks.media.display_view');
     $bundle->addEvent('form_edit', 'kaikmediagallery.ui_hooks.media.form_edit');
     $bundle->addEvent('form_delete', 'kaikmediagallery.ui_hooks.media.form_delete');
     $bundle->addEvent('validate_edit', 'kaikmediagallery.ui_hooks.media.validate_edit');
     $bundle->addEvent('validate_delete', 'kaikmediagallery.ui_hooks.media.validate_delete');
     $bundle->addEvent('process_edit', 'kaikmediagallery.ui_hooks.media.process_edit');
     $bundle->addEvent('process_delete', 'kaikmediagallery.ui_hooks.media.process_delete');
     $this->registerHookSubscriberBundle($bundle);
     $bundle = new SubscriberBundle('KaikmediaGalleryModule', 'subscriber.kaikmediagallery.filter_hooks.mediafilter', 'filter_hooks', $this->__('Gallery Filter Hooks'));
     $bundle->addEvent('filter', 'kaikmediagallery.filter_hooks.media.filter');
     $this->registerHookSubscriberBundle($bundle);
     $bundle = new ProviderBundle('KaikmediaGalleryModule', 'provider.kaikmediagallery.ui_hooks.media', 'ui_hooks', $this->__('KMGallery media provider'));
     $bundle->addServiceHandler('display_view', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'uiView', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('form_edit', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'uiEdit', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('form_delete', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'uiDelete', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('validate_edit', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'validateEdit', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('validate_delete', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'validateDelete', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('process_edit', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'processEdit', 'kaikmediagallery.hooks.media');
     $bundle->addServiceHandler('process_delete', 'Kaikmedia\\GalleryModule\\Hook\\MediaHandlers', 'processDelete', 'kaikmediagallery.hooks.media');
     $this->registerHookProviderBundle($bundle);
 }
Exemple #7
0
 /**
  * Unregister a subscriber bundle from persistence.
  *
  * @param SubscriberBundle $bundle
  */
 public function unregisterSubscriberBundle(SubscriberBundle $bundle)
 {
     $this->storage->unregisterSubscriberByArea($bundle->getArea());
     $this->reload();
 }
 /**
  * Set up hook subscriber bundle
  * 
  * This area is only activated when editing an Html Block. 
  * There are no other hook functions currently implemented since linking
  * back (via url) to a block is impossible. 
  */
 protected function setupHookBundles()
 {
     $bundle = new SubscriberBundle($this->name, 'subscriber.blocks.ui_hooks.htmlblock.content', 'ui_hooks', $this->__('HTML Block content hook'));
     $bundle->addEvent('form_edit', 'blocks.ui_hooks.htmlblock.content.form_edit');
     $this->registerHookSubscriberBundle($bundle);
 }
Exemple #9
0
 protected function setupHookBundles()
 {
     $bundle = new SubscriberBundle('ZikulaBlocksModule', 'foo.area', 'ui_hooks', $this->__('Translatable title'));
     $bundle->addEvent('form_edit', 'foo.event.name');
     $this->registerHookSubscriberBundle($bundle);
 }