3 namespace Drupal\Core\Entity;
6 * A storage that supports entity types with field definitions.
8 interface FieldableEntityStorageInterface extends EntityStorageInterface {
11 * Determines the number of entities with values for a given field.
13 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
14 * The field for which to count data records.
15 * @param bool $as_bool
16 * (Optional) Optimises the query for checking whether there are any records
17 * or not. Defaults to FALSE.
20 * The number of entities. If $as_bool parameter is TRUE then the
21 * value will either be TRUE or FALSE.
23 * @see \Drupal\Core\Entity\FieldableEntityStorageInterface::purgeFieldData()
25 public function countFieldData($storage_definition, $as_bool = FALSE);