public function WebformEntityReferenceManager::hasField in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityReferenceManager.php \Drupal\webform\WebformEntityReferenceManager::hasField()
Determine if the entity has a webform entity reference field.
Parameters
\Drupal\Core\Entity\EntityInterface|null $entity: A fieldable content entity.
Return value
bool TRUE if the entity has a webform entity reference field.
Overrides WebformEntityReferenceManagerInterface::hasField
File
- src/
WebformEntityReferenceManager.php, line 169
Class
- WebformEntityReferenceManager
- Webform entity reference (field) manager.
Namespace
Drupal\webformCode
public function hasField(EntityInterface $entity = NULL) {
return $this
->getFieldName($entity) ? TRUE : FALSE;
}