public function FieldCollection::getTargetBundleId in Reference Table Formatter 8
Get the target bundle from a reference field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition to check the target bundle.
Return value
string The bundle that is the target of the field.
Throws
\Exception
Overrides FormatterInterface::getTargetBundleId
File
- src/
Plugin/ Field/ FieldFormatter/ FieldCollection.php, line 73
Class
- FieldCollection
- A field formatter to display a table.
Namespace
Drupal\reference_table_formatter\Plugin\Field\FieldFormatterCode
public function getTargetBundleId(FieldDefinitionInterface $field_definition) {
return $field_definition
->getName();
}