/** * Get the Reflection Class of an entity * * @param $entity * @return null|\ReflectionClass */ public function getReflClass($entity) { if (is_object($entity)) { try { $classMetadata = $this->tagManager->getEm()->getClassMetadata(get_class($entity)); return $classMetadata->reflClass; } catch (\Exception $e) { } } return null; }
/** * Get the Choice List * * @param $options * @return EntityChoiceList */ protected function getChoiceList($options) { $loader = $this->getEntityLoader($options); return new EntityChoiceList($this->tagManager->getEm(), $options['class'], null, $loader); }