private function getMetaFieldAnnotationData($property, $directory)
    {
        /** @var MetaField $annotation */
        $annotation = $this->reader->getPropertyAnnotation($property, self::ID_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::PARENT_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::ROUTING_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::VERSION_ANNOTATION);

        if ($annotation === null) {
            return null;
        }

        $data = [
            'name' => $annotation->getName(),
            'settings' => $annotation->getSettings(),
        ];

        if ($annotation instanceof ParentDocument) {
            $data['settings']['type'] = $this->getDocumentType($annotation->class, $directory);
        }

        return $data;
    }
private function getMetaFieldAnnotationData($property, $directory)
    {
        /** @var MetaField $annotation */
        $annotation = $this->reader->getPropertyAnnotation($property, self::ID_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::PARENT_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::ROUTING_ANNOTATION);
        $annotation = $annotation ?: $this->reader->getPropertyAnnotation($property, self::VERSION_ANNOTATION);

        if ($annotation === null) {
            return null;
        }

        $data = [
            'name' => $annotation->getName(),
            'settings' => $annotation->getSettings(),
        ];

        if ($annotation instanceof ParentDocument) {
            $data['settings']['type'] = $this->getDocumentType($annotation->class, $directory);
        }

        return $data;
    }
private function getMetaFieldAnnotationData ( $ property , $ directory ) { /** @var MetaField $annotation */ $ annotation = $ this -> reader -> getPropertyAnnotation ( $ property , self :: ID_ANNOTATION ) ; $ annotation = $ annotation ? : $ this -> reader -> getPropertyAnnotation ( $ property , self :: PARENT_ANNOTATION ) ; $ annotation = $ annotation ? : $ this -> reader -> getPropertyAnnotation ( $ property , self :: ROUTING_ANNOTATION ) ; $ annotation = $ annotation ? : $ this -> reader -> getPropertyAnnotation ( $ property , self :: VERSION_ANNOTATION ) ; if ( $ annotation === null ) { return null ; } $ data = [ 'name' => $ annotation -> getName ( ) , 'settings' => $ annotation -> getSettings ( ) , ] ; if ( $ annotation instanceof ParentDocument ) { $ data [ 'settings' ] [ 'type' ] = $ this -> getDocumentType ( $ annotation -> class , $ directory ) ; } return $ data ; }
Returns meta field annotation data from reader.

@param \ReflectionProperty $property
@param string              $directory The name of the Document directory in the bundle

@return array
Returns meta field annotation data from reader .