public function Flow::getUsedPoolsForPulling in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow::getUsedPoolsForPulling()
Get a list of all pools that are used for pushing this entity, either automatically or manually selected.
Parameters
string $entity_type:
string $bundle:
Return value
Pool[]
File
- src/
Entity/ Flow.php, line 337
Class
- Flow
- Defines the "Content Sync - Flow" entity.
Namespace
Drupal\cms_content_sync\EntityCode
public function getUsedPoolsForPulling($entity_type, $bundle) {
$config = $this
->getEntityTypeConfig($entity_type, $bundle);
if (empty($config['import_pools'])) {
return [];
}
$result = [];
$pools = Pool::getAll();
foreach ($config['import_pools'] as $id => $setting) {
$pool = $pools[$id];
if (Pool::POOL_USAGE_FORBID == $setting) {
continue;
}
$result[] = $pool;
}
return $result;
}