public function getOptions() { $options = array(); foreach ($this->getRepository()->findAll() as $userType) { $options[$userType->getId()] = $userType->getName(); } return $options; }