public static function Pool::getAllSitesWithDifferentEntityTypeVersion in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Entity/Pool.php \Drupal\cms_content_sync\Entity\Pool::getAllSitesWithDifferentEntityTypeVersion()
- 2.0.x src/Entity/Pool.php \Drupal\cms_content_sync\Entity\Pool::getAllSitesWithDifferentEntityTypeVersion()
Get a list of all sites from all pools that use a different version ID and provide a diff on field basis.
Parameters
string $entity_type:
string $bundle:
Return value
array pool => site_id[]
Throws
\Exception
1 call to Pool::getAllSitesWithDifferentEntityTypeVersion()
- _cms_content_sync_display_entity_type_differences in ./
cms_content_sync.module - Get HTML for a list of entity type differences.
File
- src/
Entity/ Pool.php, line 149
Class
- Pool
- Defines the "Content Sync - Pool" entity.
Namespace
Drupal\cms_content_sync\EntityCode
public static function getAllSitesWithDifferentEntityTypeVersion($entity_type, $bundle) {
$result = [];
foreach (Pool::getAll() as $pool_id => $pool) {
$diff = $pool
->getClient()
->getSitesWithDifferentEntityTypeVersion($pool->id, $entity_type, $bundle, Flow::getEntityTypeVersion($entity_type, $bundle));
if (empty($diff)) {
continue;
}
$result[$pool_id] = $diff;
}
return $result;
}