public function WorkflowCollector::supported in Workbench Moderation to Content Moderation 8.2
1 call to WorkflowCollector::supported()
File
- src/
WorkflowCollector.php, line 160
Class
Namespace
Drupal\wbm2cmCode
public function supported() {
foreach ($this->entityTypeManager
->getDefinitions() as $id => $entity_type) {
if ($entity_type
->getBundleOf()) {
$storage = $this->entityTypeManager
->getStorage($id);
foreach ($storage
->getQuery()
->execute() as $entity_id) {
/** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
$entity = $storage
->load($entity_id);
if (in_array('workbench_moderation', $entity
->getThirdPartyProviders(), TRUE)) {
(yield $entity_id => $entity);
}
}
}
}
}