summaryrefslogtreecommitdiff
path: root/app/Subscriber/RecurringTaskSubscriber.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Subscriber/RecurringTaskSubscriber.php')
-rw-r--r--app/Subscriber/RecurringTaskSubscriber.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/Subscriber/RecurringTaskSubscriber.php b/app/Subscriber/RecurringTaskSubscriber.php
index 09a5665a..75b7ff76 100644
--- a/app/Subscriber/RecurringTaskSubscriber.php
+++ b/app/Subscriber/RecurringTaskSubscriber.php
@@ -3,7 +3,7 @@
namespace Kanboard\Subscriber;
use Kanboard\Event\TaskEvent;
-use Kanboard\Model\Task;
+use Kanboard\Model\TaskModel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class RecurringTaskSubscriber extends BaseSubscriber implements EventSubscriberInterface
@@ -11,8 +11,8 @@ class RecurringTaskSubscriber extends BaseSubscriber implements EventSubscriberI
public static function getSubscribedEvents()
{
return array(
- Task::EVENT_MOVE_COLUMN => 'onMove',
- Task::EVENT_CLOSE => 'onClose',
+ TaskModel::EVENT_MOVE_COLUMN => 'onMove',
+ TaskModel::EVENT_CLOSE => 'onClose',
);
}
@@ -20,11 +20,11 @@ class RecurringTaskSubscriber extends BaseSubscriber implements EventSubscriberI
{
$this->logger->debug('Subscriber executed: '.__METHOD__);
- if ($event['recurrence_status'] == Task::RECURRING_STATUS_PENDING) {
- if ($event['recurrence_trigger'] == Task::RECURRING_TRIGGER_FIRST_COLUMN && $this->column->getFirstColumnId($event['project_id']) == $event['src_column_id']) {
- $this->taskDuplication->duplicateRecurringTask($event['task_id']);
- } elseif ($event['recurrence_trigger'] == Task::RECURRING_TRIGGER_LAST_COLUMN && $this->column->getLastColumnId($event['project_id']) == $event['dst_column_id']) {
- $this->taskDuplication->duplicateRecurringTask($event['task_id']);
+ if ($event['recurrence_status'] == TaskModel::RECURRING_STATUS_PENDING) {
+ if ($event['recurrence_trigger'] == TaskModel::RECURRING_TRIGGER_FIRST_COLUMN && $this->columnModel->getFirstColumnId($event['project_id']) == $event['src_column_id']) {
+ $this->taskDuplicationModel->duplicateRecurringTask($event['task_id']);
+ } elseif ($event['recurrence_trigger'] == TaskModel::RECURRING_TRIGGER_LAST_COLUMN && $this->columnModel->getLastColumnId($event['project_id']) == $event['dst_column_id']) {
+ $this->taskDuplicationModel->duplicateRecurringTask($event['task_id']);
}
}
}
@@ -33,8 +33,8 @@ class RecurringTaskSubscriber extends BaseSubscriber implements EventSubscriberI
{
$this->logger->debug('Subscriber executed: '.__METHOD__);
- if ($event['recurrence_status'] == Task::RECURRING_STATUS_PENDING && $event['recurrence_trigger'] == Task::RECURRING_TRIGGER_CLOSE) {
- $this->taskDuplication->duplicateRecurringTask($event['task_id']);
+ if ($event['recurrence_status'] == TaskModel::RECURRING_STATUS_PENDING && $event['recurrence_trigger'] == TaskModel::RECURRING_TRIGGER_CLOSE) {
+ $this->taskDuplicationModel->duplicateRecurringTask($event['task_id']);
}
}
}