protected getCustomer ( $id ) : Sonata\Component\Customer\CustomerInterface | ||
$id | ||
Résultat | Sonata\Component\Customer\CustomerInterface |
protected function getCustomer($id)
{
$customer = $this->customerManager->findOneBy(array('id' => $id));
if (null === $customer) {
throw new NotFoundHttpException(sprintf('Customer (%d) not found', $id));
}
return $customer;
}