metadata = $metadata; $this->entityManager = $entityManager; } public function getFullTextSearchOrderType(string $entityType) : ?string { return $this->metadata->get([ 'entityDefs', $entityType, 'collection', 'fullTextSearchOrderType' ]); } public function getTextFilterFieldList(string $entityType) : ?array { return $this->metadata->get([ 'entityDefs', $entityType, 'collection', 'textFilterFields' ]); } public function isFieldNotStorable(string $entityType, string $field) : bool { return (bool) $this->metadata->get([ 'entityDefs', $entityType, 'fields', $field, 'notStorable' ]); } public function isFullTextSearchSupportedForField(string $entityType, string $field) : bool { $fieldType = $this->metadata->get([ 'entityDefs', $entityType, 'fields', $field, 'type' ]); return (bool) $this->metadata->get([ 'fields', $fieldType, 'fullTextSearch' ]); } public function hasFullTextSearch(string $entityType) : bool { return (bool) $this->metadata->get([ 'entityDefs', $entityType, 'collection', 'fullTextSearch' ]); } public function getFullTextSearchColumnList(string $entityType) : ?array { return $this->entityManager ->getMetadata() ->get($entityType, ['fullTextSearchColumnList']); } public function getRelationType(string $entityType, string $link) : ?string { return (bool) $this->entityManager ->getMetadata() ->get($entityType, ['relations', $link, 'type']); } public function getRelationEntityType(string $entityType, string $link) : ?string { return (bool) $this->entityManager ->getMetadata() ->get($entityType, ['relations', $link, 'entity']); } public function getAttributeType(string $entityType, string $attribute) : ?string { return (bool) $this->entityManager ->getMetadata() ->get($entityType, ['fields', $attribute, 'type']); } public function getAttributeRelationParam(string $entityType, string $attribute) : ?string { return (bool) $this->entityManager ->getMetadata() ->get($entityType, ['fields', $attribute, 'relation']); } }