You are here

protected function TermFieldAutocomplete::getTermType in GraphQL 8.4

Gets the term type.

Return value

\Drupal\Core\Entity\ContentEntityTypeInterface The term type.

File

src/Plugin/GraphQL/DataProducer/Taxonomy/TermFieldAutocomplete.php, line 148

Class

TermFieldAutocomplete
Gets term items matching the given string in given field's vocabularies.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Taxonomy

Code

protected function getTermType() : ContentEntityTypeInterface {
  if (!isset($this->termType)) {

    /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $term_type */
    $term_type = $this->entityTypeManager
      ->getDefinition('taxonomy_term');
    $this->termType = $term_type;
  }
  return $this->termType;
}