public function deleteAddressAction($id)
{
if ($this->getRequest()->getMethod() !== 'POST') {
throw new MethodNotAllowedHttpException(array('POST'));
}
$address = $this->getAddressManager()->findOneBy(array('id' => $id));
$this->checkAddress($address);
$this->getAddressManager()->delete($address);
$this->get('session')->getFlashBag()->add('sonata_customer_success', 'customer_address_delete');
return new RedirectResponse($this->generateUrl('sonata_customer_addresses'));
}