Controller/FormController.php
public function postAction(Request $request)
    {
        $locale = $this->getLocale($request);

        // create entity
        $entity = $this->getManager()->save($this->getData($request), $locale);

        return $this->handleView($this->view($this->getApiEntity($entity, $locale), 201));
    }
public function postAction(Request $request)
    {
        $locale = $this->getLocale($request);

        // create entity
        $entity = $this->getManager()->save($this->getData($request), $locale);

        return $this->handleView($this->view($this->getApiEntity($entity, $locale), 201));
    }
@param Request $request

@return Response