public function FieldStorageConfig::hasData in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 703 - Contains \Drupal\field\Entity\FieldStorageConfig.
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function hasData() {
return \Drupal::entityManager()
->getStorage($this->entity_type)
->countFieldData($this, TRUE);
}