FieldStorageConfig::hasData

public 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 699

Class

FieldStorageConfig
Defines the Field storage configuration entity.

Namespace

Drupal\field\Entity

Code

public function hasData() {
  return \Drupal::entityManager()->getStorage($this->entity_type)->countFieldData($this, TRUE);
}
doc_Drupal
2016-10-29 09:12:21
Comments
Leave a Comment

Please login to continue.