public function populateResourceWithForm(Resource $resource, FormInterface $form)
    {
        $formData = $form->getData();

        $resource->setData(
            array(
                'username' => $formData['username'],
                'email'    => $formData['email']
            )
        );
    }