public function WebformRevisionsConfigTrait::contentEntityCount in Config Entity Revisions 8
Same name and namespace in other branches
- 1.x modules/webform_revisions/src/WebformRevisionsConfigTrait.php \Drupal\webform_revisions\WebformRevisionsConfigTrait::contentEntityCount()
Get the number of submissions related to a revision.
Return value
integer The number of content entities using a particular revision.
File
- modules/
webform_revisions/ src/ WebformRevisionsConfigTrait.php, line 33
Class
Namespace
Drupal\webform_revisionsCode
public function contentEntityCount($rid) {
return \Drupal::database()
->query("SELECT COUNT(sid) FROM {webform_submission} WHERE webform_revision = :rid", [
':rid' => $rid,
])
->fetchField();
}