I'm building a custom compound field in Drupal 8. I'm almost there, but one final bit I'm missing: when I add this new field type to a content type, the taxonomy autocomplete field pulls from every taxonomy vocabulary on the site.
I'm trying to determine how to only pull from a specific "plant_parts" vocabulary. Currently, within my widget code, I've got this:
$element['plant_component_measured'] = array(
'#type' => 'entity_autocomplete',
'#target_type' => 'taxonomy_term',
'#title' => t('Plant part'),
'#prefix' => '<table><tr><td>',
'#suffix' => ' ',
'#default_value' => isset($items[$delta]->plant_component_measured) ?
$items[$delta]->plant_component_measured : NULL,
);