public function FieldStorageConfig::hasData in Drupal 9
Same name and namespace in other branches
- 8 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::hasData()
Determines whether a field has any data.
Return value
bool TRUE if the field has data for any entity; FALSE otherwise.
File
- core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 707
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function hasData() {
return \Drupal::entityTypeManager()
->getStorage($this->entity_type)
->countFieldData($this, TRUE);
}