You are here

protected function TermFieldAutocomplete::getFieldConfig in GraphQL 8.4

Gets the field config for given field of given entity type of given bundle.

Parameters

string $entity_type: Entity type to get the field config for.

string $bundle: Bundle to get the field config for.

string $field: Field to get the field config for.

Return value

\Drupal\field\FieldConfigInterface|null Field config for given field of given entity type of given bundle, or null if it does not exist.

1 call to TermFieldAutocomplete::getFieldConfig()
TermFieldAutocomplete::getTermFieldVocabularies in src/Plugin/GraphQL/DataProducer/Taxonomy/TermFieldAutocomplete.php
Gets the vocabularies configured for given field if it is a term field.

File

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

Class

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

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Taxonomy

Code

protected function getFieldConfig(string $entity_type, string $bundle, string $field) : ?FieldConfigInterface {

  /** @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $field_config_storage */
  $field_config_storage = $this->entityTypeManager
    ->getStorage('field_config');

  /** @var \Drupal\field\FieldConfigInterface|null $field_config */
  $field_config = $field_config_storage
    ->load($entity_type . '.' . $bundle . '.' . $field);
  return $field_config;
}