You are here

private function AdminSettingsForm::getTaxonomyTermFieldNames in Acquia Lift Connector 8.3

Same name and namespace in other branches
  1. 8.4 src/Form/AdminSettingsForm.php \Drupal\acquia_lift\Form\AdminSettingsForm::getTaxonomyTermFieldNames()
  2. 8 src/Form/AdminSettingsForm.php \Drupal\acquia_lift\Form\AdminSettingsForm::getTaxonomyTermFieldNames()

Get a list of Field names that are targeting type Taxonomy Terms.

Return value

array An array of field names.

2 calls to AdminSettingsForm::getTaxonomyTermFieldNames()
AdminSettingsForm::buildFieldMappingsForm in src/Form/AdminSettingsForm.php
Build field mappings form.
AdminSettingsForm::buildUdfMappingsForm in src/Form/AdminSettingsForm.php
Build UDF mappings form.

File

src/Form/AdminSettingsForm.php, line 342

Class

AdminSettingsForm
Defines a form that configures settings.

Namespace

Drupal\acquia_lift\Form

Code

private function getTaxonomyTermFieldNames() {
  $definitions = $this->entityManager
    ->getFieldStorageDefinitions('node');
  $field_names = [];
  foreach ($definitions as $field_name => $field_storage) {
    if ($field_storage
      ->getType() != 'entity_reference' || $field_storage
      ->getSetting('target_type') !== 'taxonomy_term') {
      continue;
    }
    $field_names[$field_name] = $field_name;
  }
  return $field_names;
}