PHP Class Newscoop\GimmeBundle\Controller\UserTopicsController

Inheritance: extends FOS\RestBundle\Controller\FOSRestController
显示文件 Open project: sourcefabric/newscoop

Public Methods

Method Description
getUserTopicsAction ( Request $request, $id ) : array Get topics followed by user
linkToUserAction ( Request $request, $id ) Link topic to user
unlinkFromUserAction ( Request $request, $id ) Unlink topic from the user

Private Methods

Method Description
findUserByIdOr404 ( $id )
linkOrUnlinkResources ( array $resources, $user, $follow = false )

Method Details

getUserTopicsAction() public method

Get topics followed by user
public getUserTopicsAction ( Request $request, $id ) : array
$request Symfony\Component\HttpFoundation\Request
return array

linkToUserAction() public method

**topics headers**: header name: "link" header value: ""
public linkToUserAction ( Request $request, $id )
$request Symfony\Component\HttpFoundation\Request

unlinkFromUserAction() public method

**topics headers**: header name: "link" header value: ""
public unlinkFromUserAction ( Request $request, $id )
$request Symfony\Component\HttpFoundation\Request