protected function addCategories($contact, $data)
{
$success = true;
$category = $this->em->getRepository(self::$categoryEntityName)->find($data['id']);
if (!$category) {
throw new EntityNotFoundException(self::$categoryEntityName, $data['id']);
} else {
$contact->addCategory($category);
}
return $success;
}