croogo/croogo — pull request #68 by rchavik (2012-04-11 14:51:31+00:00)
Title: 1.4 events

Trigger custom events for plugin consumption:

For example

```php
attach(new FooEventHandler(), 'Controller.Users.loginSuccessful');
```

```php
array(
'callable' => 'onLoginSuccessful',
),
);
}

public function onLoginSuccessful($event) {
$Users = $event->subject();
$this->log($User->request->data['User']['name'] . ' logged in from ' . env('REMOTE_ADDR');
if ($redirectToSomewhereElse) {
$Users->redirect(array('controller' => 'nodes', 'action' => 'create'));
}
}
}
```

Comments?

perhaps @shama ?