public function getPointValueForAction($action) { $user_points = $this->findOneBy(array('action' => $action)); if (is_null($user_points)) { return 0; } return $user_points->getPoints(); }