public static function PushIntent::isPushing in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 src/PushIntent.php \Drupal\cms_content_sync\PushIntent::isPushing()
- 2.0.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::isPushing()
Check whether the given entity is currently being pushed. Useful to check against hierarchical references as for nodes and menu items for example.
Parameters
string $entity_type: The entity type to check for
string $uuid: The UUID of the entity in question
string $pool: The pool to push to
null|string $action: See ::ACTION_*
Return value
bool
1 call to PushIntent::isPushing()
File
- src/
PushIntent.php, line 546
Class
- PushIntent
- Class PushIntent.
Namespace
Drupal\cms_content_syncCode
public static function isPushing($entity_type, $uuid, $pool = null, $action = null) {
foreach (self::$pushed as $do => $types) {
if ($action ? $do != $action : SyncIntent::ACTION_DELETE == $do) {
continue;
}
if (!isset($types[$entity_type])) {
continue;
}
foreach ($types[$entity_type] as $bundle => $entities) {
if (empty($pool)) {
if (!empty($entities[$uuid])) {
return true;
}
}
else {
if (!empty($entities[$uuid][$pool])) {
return true;
}
}
}
}
return false;
}