public function WebformEntityReferenceManager::getFieldName in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformEntityReferenceManager.php \Drupal\webform\WebformEntityReferenceManager::getFieldName()
Get an entity's webform field name.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: A fieldable content entity.
Return value
string The name of the webform field or an empty string.
Overrides WebformEntityReferenceManagerInterface::getFieldName
1 call to WebformEntityReferenceManager::getFieldName()
- WebformEntityReferenceManager::hasField in src/
WebformEntityReferenceManager.php - Determine if the entity has a webform entity reference field.
File
- src/
WebformEntityReferenceManager.php, line 176
Class
- WebformEntityReferenceManager
- Webform entity reference (field) manager.
Namespace
Drupal\webformCode
public function getFieldName(EntityInterface $entity = NULL) {
$field_names = $this
->getFieldNames($entity);
return $field_names ? reset($field_names) : '';
}