Skip to content

Commit

Permalink
updated user-related events (#2940)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Jul 23, 2016
1 parent d07fe51 commit c94f274
Show file tree
Hide file tree
Showing 28 changed files with 289 additions and 957 deletions.
11 changes: 5 additions & 6 deletions src/system/RoutesModule/Listener/Base/CoreListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
class CoreListener implements EventSubscriberInterface
{

/**
* Makes our handlers known to the event system.
*/
Expand All @@ -47,7 +46,7 @@ public static function getSubscribedEvents()
* Must exit if $event['method'] does not match whatever the handler expects.
* Modify $event->data and $event->stopPropagation().
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function apiMethodNotFound(GenericEvent $event)
{
Expand All @@ -58,7 +57,7 @@ public function apiMethodNotFound(GenericEvent $event)
*
* Occurs after the config.php is loaded.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function preInit(GenericEvent $event)
{
Expand All @@ -70,7 +69,7 @@ public function preInit(GenericEvent $event)
* Occurs after each `System::init()` stage, `$event['stage']` contains the stage.
* To check if the handler should execute, do `if($event['stage'] & System::CORE_STAGES_*)`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function init(GenericEvent $event)
{
Expand All @@ -81,7 +80,7 @@ public function init(GenericEvent $event)
*
* Occurs just before System::init() exits from normal execution.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function postInit(GenericEvent $event)
{
Expand All @@ -98,7 +97,7 @@ public function postInit(GenericEvent $event)
* Must exit if `$event['method']` does not match whatever the handler expects.
* Modify `$event->data` and `$event->stopPropagation()`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function controllerMethodNotFound(GenericEvent $event)
{
Expand Down
19 changes: 8 additions & 11 deletions src/system/RoutesModule/Listener/Base/GroupListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function getSubscribedEvents()
* Occurs after a group is created. All handlers are notified.
* The full group record created is available as the subject.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function create(GenericEvent $event)
{
Expand All @@ -53,7 +53,7 @@ public function create(GenericEvent $event)
* Occurs after a group is updated. All handlers are notified.
* The full updated group record is available as the subject.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function update(GenericEvent $event)
{
Expand All @@ -62,11 +62,10 @@ public function update(GenericEvent $event)
/**
* Listener for the `group.delete` event.
*
* Occurs after a group is deleted from the system.
* All handlers are notified.
* Occurs after a group is deleted from the system. All handlers are notified.
* The full group record deleted is available as the subject.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function delete(GenericEvent $event)
{
Expand All @@ -75,12 +74,11 @@ public function delete(GenericEvent $event)
/**
* Listener for the `group.adduser` event.
*
* Occurs after a user is added to a group.
* All handlers are notified.
* Occurs after a user is added to a group. All handlers are notified.
* It does not apply to pending membership requests.
* The uid and gid are available as the subject.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function addUser(GenericEvent $event)
{
Expand All @@ -89,11 +87,10 @@ public function addUser(GenericEvent $event)
/**
* Listener for the `group.removeuser` event.
*
* Occurs after a user is removed from a group.
* All handlers are notified.
* Occurs after a user is removed from a group. All handlers are notified.
* The uid and gid are available as the subject.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function removeUser(GenericEvent $event)
{
Expand Down
14 changes: 7 additions & 7 deletions src/system/RoutesModule/Listener/Base/InstallerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function getSubscribedEvents()
* Called after a module has been successfully installed.
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function moduleInstalled(ModuleStateEvent $event)
{
Expand All @@ -57,7 +57,7 @@ public function moduleInstalled(ModuleStateEvent $event)
* Called after a module has been installed (on reload of the extensions view).
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function modulePostInstalled(ModuleStateEvent $event)
{
Expand All @@ -69,7 +69,7 @@ public function modulePostInstalled(ModuleStateEvent $event)
* Called after a module has been successfully upgraded.
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function moduleUpgraded(ModuleStateEvent $event)
{
Expand All @@ -81,7 +81,7 @@ public function moduleUpgraded(ModuleStateEvent $event)
* Called after a module has been successfully enabled.
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function moduleEnabled(ModuleStateEvent $event)
{
Expand All @@ -93,7 +93,7 @@ public function moduleEnabled(ModuleStateEvent $event)
* Called after a module has been successfully disabled.
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function moduleDisabled(ModuleStateEvent $event)
{
Expand All @@ -105,7 +105,7 @@ public function moduleDisabled(ModuleStateEvent $event)
* Called after a module has been successfully removed.
* Receives `$modinfo` as args.
*
* @param ModuleStateEvent $event The event instance.
* @param ModuleStateEvent $event The event instance
*/
public function moduleRemoved(ModuleStateEvent $event)
{
Expand All @@ -117,7 +117,7 @@ public function moduleRemoved(ModuleStateEvent $event)
* Called after a hook subscriber area has been unregistered.
* Receives args['areaid'] as the areaId. Use this to remove orphan data associated with this area.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function subscriberAreaUninstalled(GenericEvent $event)
{
Expand Down
15 changes: 7 additions & 8 deletions src/system/RoutesModule/Listener/Base/KernelListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*/
class KernelListener implements EventSubscriberInterface
{

/**
* Makes our handlers known to the event system.
*/
Expand Down Expand Up @@ -57,7 +56,7 @@ public static function getSubscribedEvents()
*
* Example from Symfony: the RouterListener determines controller and information about arguments.
*
* @param GetResponseEvent $event The event instance.
* @param GetResponseEvent $event The event instance
*/
public function onRequest(GetResponseEvent $event)
{
Expand All @@ -73,7 +72,7 @@ public function onRequest(GetResponseEvent $event)
*
* Example from Symfony: the ParamConverterListener performs reflection and type conversion.
*
* @param FilterControllerEvent $event The event instance.
* @param FilterControllerEvent $event The event instance
*/
public function onController(FilterControllerEvent $event)
{
Expand All @@ -90,7 +89,7 @@ public function onController(FilterControllerEvent $event)
*
* Example from Symfony: TemplateListener renders Twig templates with returned arrays.
*
* @param GetResponseForControllerResultEvent $event The event instance.
* @param GetResponseForControllerResultEvent $event The event instance
*/
public function onView(GetResponseForControllerResultEvent $event)
{
Expand All @@ -112,7 +111,7 @@ public function onView(GetResponseForControllerResultEvent $event)
* - WebDebugToolbarListener: injects the web debug toolbar
* - ResponseListener: updates the content type according to the request format
*
* @param FilterResponseEvent $event The event instance.
* @param FilterResponseEvent $event The event instance
*/
public function onResponse(FilterResponseEvent $event)
{
Expand All @@ -126,7 +125,7 @@ public function onResponse(FilterResponseEvent $event)
*
* You can cleanup things here which are not directly related to the response.
*
* @param FinishRequestEvent $event The event instance.
* @param FinishRequestEvent $event The event instance
*/
public function onFinishRequest(FinishRequestEvent $event)
{
Expand All @@ -143,7 +142,7 @@ public function onFinishRequest(FinishRequestEvent $event)
* Example from Symfony: SwiftmailerBundle with memory spooling activates an
* EmailSenderListener which delivers emails created during the request.
*
* @param PostResponseEvent $event The event instance.
* @param PostResponseEvent $event The event instance
*/
public function onTerminate(PostResponseEvent $event)
{
Expand All @@ -157,7 +156,7 @@ public function onTerminate(PostResponseEvent $event)
*
* You can inject custom error handling for specific error types.
*
* @param GetResponseForExceptionEvent $event The event instance.
* @param GetResponseForExceptionEvent $event The event instance
*/
public function onException(GetResponseForExceptionEvent $event)
{
Expand Down
8 changes: 4 additions & 4 deletions src/system/RoutesModule/Listener/Base/MailerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function getSubscribedEvents()
* This is a notifyUntil event so the event must `$event->stopPropagation()` and set any
* return data into `$event->data`, or `$event->setData()`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function sendMessageStart(GenericEvent $event)
{
Expand All @@ -59,7 +59,7 @@ public function sendMessageStart(GenericEvent $event)
* This is a notifyUntil event so the event must `$event->stopPropagation()` and set any
* return data into `$event->data`, or `$event->setData()`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function sendMessagePerform(GenericEvent $event)
{
Expand All @@ -71,7 +71,7 @@ public function sendMessagePerform(GenericEvent $event)
*
* Invoked from `Zikula\MailerModule\Api\MailerApi#performSending`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function sendMessageSuccess(GenericEvent $event)
{
Expand All @@ -83,7 +83,7 @@ public function sendMessageSuccess(GenericEvent $event)
*
* Invoked from `Zikula\MailerModule\Api\MailerApi#performSending`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function sendMessageFailure(GenericEvent $event)
{
Expand Down
10 changes: 5 additions & 5 deletions src/system/RoutesModule/Listener/Base/ModuleDispatchListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function getSubscribedEvents()
* Called after a module api or controller has been loaded.
* Receives the args `['modinfo' => $modinfo, 'type' => $type, 'force' => $force, 'api' => $api]`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function postLoadGeneric(GenericEvent $event)
{
Expand All @@ -60,7 +60,7 @@ public function postLoadGeneric(GenericEvent $event)
* ]`
* .
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function preExecute(GenericEvent $event)
{
Expand All @@ -82,7 +82,7 @@ public function preExecute(GenericEvent $event)
* Receives the modules output with `$event->getData();`.
* Can modify this output with `$event->setData($data);`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function postExecute(GenericEvent $event)
{
Expand All @@ -97,7 +97,7 @@ public function postExecute(GenericEvent $event)
* Receives no subject, args of `['modname' => $modname, 'modinfo' => $modinfo, 'type' => $type, 'api' => $api]`
* and 'event data' of `$className`. This can be altered by setting `$event->setData()` followed by `$event->stopPropagation()`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function customClassname(GenericEvent $event)
{
Expand All @@ -110,7 +110,7 @@ public function customClassname(GenericEvent $event)
* Adds sublinks to a Services menu that is appended to all modules if populated.
* Triggered by module_dispatch.postexecute in bootstrap.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function serviceLinks(GenericEvent $event)
{
Expand Down
4 changes: 2 additions & 2 deletions src/system/RoutesModule/Listener/Base/PageListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function getSubscribedEvents()
* This single filter can be used to override all css or js scripts or any other var types
* sent to `PageUtil::addVar()`.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function pageutilAddvarFilter(GenericEvent $event)
{
Expand All @@ -51,7 +51,7 @@ public function pageutilAddvarFilter(GenericEvent $event)
*
* Filter type event for output filter HTML sanitisation.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function systemOutputFilter(GenericEvent $event)
{
Expand Down
10 changes: 5 additions & 5 deletions src/system/RoutesModule/Listener/Base/ThemeListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function getSubscribedEvents()
*
* Note that Zikula_View_Theme is deprecated and being replaced by Twig.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function preInit(GenericEvent $event)
{
Expand All @@ -57,7 +57,7 @@ public function preInit(GenericEvent $event)
*
* Note that Zikula_View_Theme is deprecated and being replaced by Twig.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function init(GenericEvent $event)
{
Expand All @@ -69,7 +69,7 @@ public function init(GenericEvent $event)
* Runs just before `Theme#load_config()` completed.
* Subject is the Theme instance.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function loadConfig(GenericEvent $event)
{
Expand All @@ -82,7 +82,7 @@ public function loadConfig(GenericEvent $event)
* The event subject is `$this` (Theme instance) and has $maincontent as the event data
* which you can modify with `$event->setData()` in the event handler.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function preFetch(GenericEvent $event)
{
Expand All @@ -95,7 +95,7 @@ public function preFetch(GenericEvent $event)
* The event subject is `$this` (Theme instance) and the event data is the rendered
* output which you can modify with `$event->setData()` in the event handler.
*
* @param GenericEvent $event The event instance.
* @param GenericEvent $event The event instance
*/
public function postFetch(GenericEvent $event)
{
Expand Down
Loading

0 comments on commit c94f274

Please sign in to comment.