Refresh the board only when it's necessary and add a link on the task title
This commit is contained in:
@@ -28,6 +28,14 @@ class Event
|
||||
*/
|
||||
private $listeners = array();
|
||||
|
||||
/**
|
||||
* The last listener executed
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $lastListener = '';
|
||||
|
||||
/**
|
||||
* The last triggered event
|
||||
*
|
||||
@@ -74,11 +82,24 @@ class Event
|
||||
|
||||
if (isset($this->listeners[$eventName])) {
|
||||
foreach ($this->listeners[$eventName] as $listener) {
|
||||
$listener->execute($data); // TODO: keep an history of executed actions for unit test
|
||||
if ($listener->execute($data)) {
|
||||
$this->lastListener = get_class($listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last listener executed
|
||||
*
|
||||
* @access public
|
||||
* @return string Event name
|
||||
*/
|
||||
public function getLastListenerExecuted()
|
||||
{
|
||||
return $this->lastListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last fired event
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user