public function getExtJSAssertMappings(ClassMetadata $cm, $field) { $asserts = []; $propertyAnnotations = $this->reader->getPropertyAnnotations($cm->getReflectionProperty($field)); foreach ($propertyAnnotations as $propertyAnnotation) { $filter = "Symfony\\Component\\Validator\\Constraints\\"; if (substr(get_class($propertyAnnotation), 0, strlen($filter)) === $filter) { $assertMapping = $this->getExtJSAssertMapping($propertyAnnotation); if ($assertMapping !== false) { $asserts[] = $assertMapping; } } } return $asserts; }