Controller/TaskController.php
public function commentAction(Request $request)
    {
        $id = $request->get('id');
        $comment = $request->get('comment');

        if ($comment) {
            $comment = urldecode($comment);
        }

        $taskManager = $this->get('phlexible_task.task_manager');

        $task = $taskManager->find($id);
        $taskManager->updateTask($task, $this->getUser(), null, null, $comment);

        return new ResultResponse(true, 'Task comment created.', array('task' => $this->serializeTask($task)));
    }
public function commentAction(Request $request)
    {
        $id = $request->get('id');
        $comment = $request->get('comment');

        if ($comment) {
            $comment = urldecode($comment);
        }

        $taskManager = $this->get('phlexible_task.task_manager');

        $task = $taskManager->find($id);
        $taskManager->updateTask($task, $this->getUser(), null, null, $comment);

        return new ResultResponse(true, 'Task comment created.', array('task' => $this->serializeTask($task)));
    }
public function commentAction ( Request $ request ) { $ id = $ request -> get ( 'id' ) ; $ comment = $ request -> get ( 'comment' ) ; if ( $ comment ) { $ comment = urldecode ( $ comment ) ; } $ taskManager = $ this -> get ( 'phlexible_task.task_manager' ) ; $ task = $ taskManager -> find ( $ id ) ; $ taskManager -> updateTask ( $ task , $ this -> getUser ( ) , null , null , $ comment ) ; return new ResultResponse ( true , 'Task comment created.' , array ( 'task' => $ this -> serializeTask ( $ task ) ) ) ; }
Create task comment.

@param Request $request

@return ResultResponse
@Route("/create/comment", name="tasks_create_comment")
@Method({"GET", "POST"})
@ApiDoc(
description="Create status",
requirements={
{"name"="id", "dataType"="string", "required"=true, "description"="Task ID"},
{"name"="comment", "dataType"="string", "required"=true, "description"="Comment"}
}
)
Create task comment .