private function AdminSettingsForm::getTaxonomyTermFieldNames in Acquia Lift Connector 8.4
Same name and namespace in other branches
- 8 src/Form/AdminSettingsForm.php \Drupal\acquia_lift\Form\AdminSettingsForm::getTaxonomyTermFieldNames()
- 8.3 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 331
Class
- AdminSettingsForm
- Defines a form that configures settings.
Namespace
Drupal\acquia_lift\FormCode
private function getTaxonomyTermFieldNames() {
$definitions = $this->entityFieldManager
->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;
}