コード例 #1
0
ファイル: TaskEventJob.php プロジェクト: phecho/kanboard
 /**
  * Execute job
  *
  * @param  int    $taskId
  * @param  array  $eventNames
  * @param  array  $changes
  * @param  array  $values
  * @param  array  $task
  * @return $this
  */
 public function execute($taskId, array $eventNames, array $changes = array(), array $values = array(), array $task = array())
 {
     $event = TaskEventBuilder::getInstance($this->container)->withTaskId($taskId)->withChanges($changes)->withValues($values)->withTask($task)->buildEvent();
     if ($event !== null) {
         foreach ($eventNames as $eventName) {
             $this->fireEvent($eventName, $event);
         }
     }
 }
コード例 #2
0
 /**
  * Get iterator builder
  *
  * @access protected
  * @return EventIteratorBuilder
  */
 protected function getIteratorBuilder()
 {
     $iterator = new EventIteratorBuilder();
     $iterator->withBuilder(TaskEventBuilder::getInstance($this->container))->withBuilder(CommentEventBuilder::getInstance($this->container))->withBuilder(SubtaskEventBuilder::getInstance($this->container))->withBuilder(TaskFileEventBuilder::getInstance($this->container))->withBuilder(TaskLinkEventBuilder::getInstance($this->container));
     return $iterator;
 }