function ContentModeration::workflowStateHasData
Same name in other branches
- 8.9.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::workflowStateHasData()
- 10 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::workflowStateHasData()
- 11.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::workflowStateHasData()
Overrides WorkflowTypeBase::workflowStateHasData
File
-
core/
modules/ content_moderation/ src/ Plugin/ WorkflowType/ ContentModeration.php, line 127
Class
- ContentModeration
- Attaches workflows to content entity types and their bundles.
Namespace
Drupal\content_moderation\Plugin\WorkflowTypeCode
public function workflowStateHasData(WorkflowInterface $workflow, StateInterface $state) {
return (bool) $this->entityTypeManager
->getStorage('content_moderation_state')
->getQuery()
->condition('workflow', $workflow->id())
->condition('moderation_state', $state->id())
->count()
->accessCheck(FALSE)
->range(0, 1)
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.