protected function getProcessedForm(Request $request, $action = 'POST', $resource = array(), $options = array())
    {
        $formType = $this->getResourceFormType($action, $resource, $options);

        $formBuilder = $this->createFormBuilder($resource, $options);

        $formType->configureFormBuilder($formBuilder, $options);

        $form = $formBuilder->getForm();

        $form->handleRequest($request);

        $formType->validateForm($form);

        return $form;
    }