public function update(Comment $comment, $values)
{
// get the enitity manager
$em = $this->getEntityManager();
if (array_key_exists('subject', $values) && !is_null($values['subject'])) {
$comment->setSubject($values['subject']);
}
if (array_key_exists('message', $values) && !is_null($values['message'])) {
$comment->setMessage($values['message']);
}
if (array_key_exists('recommended', $values) && !is_null($values['recommended'])) {
$comment->setRecommended($values['recommended']);
}
if (array_key_exists('status', $values) && !is_null($values['status'])) {
$comment->setStatus($values['status']);
}
$comment->setTimeUpdated(new \DateTime());
return $comment;
}