Skip to content

Commit

Permalink
add support for new group.pre_delete event in core-3
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Mar 17, 2019
1 parent 83eece6 commit 966b50f
Showing 1 changed file with 21 additions and 0 deletions.
@@ -1,9 +1,12 @@
package org.zikula.modulestudio.generator.cartridges.zclassic.controller.listener

import de.guite.modulestudio.metamodel.Application
import org.zikula.modulestudio.generator.extensions.Utils

class GroupListener {

extension Utils = new Utils

CommonExample commonExample = new CommonExample()

def generate(Application it) '''
Expand All @@ -15,6 +18,9 @@ class GroupListener {
return [
GroupEvents::GROUP_CREATE => ['create', 5],
GroupEvents::GROUP_UPDATE => ['update', 5],
«IF targets('3.0'
GroupEvents::GROUP_PRE_DELETE => ['preDelete', 5],
«ENDIF»
GroupEvents::GROUP_DELETE => ['delete', 5],
GroupEvents::GROUP_ADD_USER => ['addUser', 5],
GroupEvents::GROUP_REMOVE_USER => ['removeUser', 5],
Expand Down Expand Up @@ -48,6 +54,21 @@ class GroupListener {
public function update(GenericEvent $event)
{
}
«IF targets('3.0'

/**
* Listener for the `group.pre_delete` event.
*
* Occurs before a group is deleted from the system. All handlers are notified.
* The full group record to be deleted is available as the subject.
*
«commonExample.generalEventProperties(it, false)»
* @param GenericEvent $event The event instance
*/
public function preDelete(GenericEvent $event)
{
}
«ENDIF»

/**
* Listener for the `group.delete` event.
Expand Down

0 comments on commit 966b50f

Please sign in to comment.