PartKeepr\DoctrineReflectionBundle\Services\ReflectionService::getExtJSAssertMappings PHP Method

getExtJSAssertMappings() public method

public getExtJSAssertMappings ( Doctrine\ORM\Mapping\ClassMetadata $cm, $field )
$cm Doctrine\ORM\Mapping\ClassMetadata
    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;
    }