use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Wallabag\AnnotationBundle\Entity\Annotation;
use Wallabag\CoreBundle\Entity\Entry;
* Creates a new annotation.
*
* @param Request $request
- * @param Entry $entry
+ * @param Entry $entry
+ *
* @return JsonResponse
- * @see Wallabag\ApiBundle\Controller\WallabagRestController
*
+ * @see Wallabag\ApiBundle\Controller\WallabagRestController
*/
public function postAnnotationAction(Request $request, Entry $entry)
{
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
- * @param Request $request
+ * @param Request $request
+ *
* @return JsonResponse
*/
public function putAnnotationAction(Annotation $annotation, Request $request)
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
+ *
* @return JsonResponse
*/
public function deleteAnnotationAction(Annotation $annotation)
* )
*
* @param Entry $entry
+ *
* @return JsonResponse
*/
public function getAnnotationsAction(Entry $entry)
$response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations',
[
- 'entry' => $entry
+ 'entry' => $entry,
]);
+
return $response;
}
* Creates a new annotation.
*
* @param Request $request
- * @param Entry $entry
+ * @param Entry $entry
+ *
* @return JsonResponse
* @ApiDoc(
* requirements={
* {"name"="text", "dataType"="string", "required"=true, "description"=""},
* }
* )
- *
*/
public function postAnnotationAction(Request $request, Entry $entry)
{
$response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation',
[
'request' => $request,
- 'entry' => $entry
+ 'entry' => $entry,
]);
+
return $response;
}
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
- * @param Request $request
+ * @param Request $request
+ *
* @return JsonResponse
*/
public function putAnnotationAction(Annotation $annotation, Request $request)
$response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation',
[
'annotation' => $annotation,
- 'request' => $request
+ 'request' => $request,
]);
+
return $response;
}
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
*
* @param Annotation $annotation
+ *
* @return JsonResponse
*/
public function deleteAnnotationAction(Annotation $annotation)
[
'annotation' => $annotation,
]);
+
return $response;
}