You are here

public function WebformRevision::contentEntityCount in Config Entity Revisions 8.2

Get the number of submissions related to a revision.

Return value

int The number of content entities using a particular revision.

File

modules/webform_revisions/src/Entity/WebformRevision.php, line 44

Class

WebformRevision
Class WebformRevision.

Namespace

Drupal\webform_revisions\Entity

Code

public function contentEntityCount($rid) {
  return \Drupal::database()
    ->query("SELECT COUNT(sid) FROM {webform_submission} WHERE webform_revision = :rid", [
    ':rid' => $rid,
  ])
    ->fetchField();
}