diff --git a/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php b/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php index 271728e..6069788 100644 --- a/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php +++ b/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php @@ -96,11 +96,7 @@ public function getValueOptions() { // Find all workflows which are moderating entity types of the same type the // view is displaying. - $query = $this->workflowStorage->getQuery(); - $query->condition('type', 'content_moderation', '='); - $result = $query->execute(); - - foreach ($this->workflowStorage->loadMultiple($result) as $workflow) { + foreach ($this->workflowStorage->loadByProperties(['type' => 'content_moderation']) as $workflow) { /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface $workflow_type */ $workflow_type = $workflow->getTypePlugin(); if (in_array($this->getEntityType(), $workflow_type->getEntityTypes(), TRUE)) {