public function Flow::getPushedEntityTypes 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::getPushedEntityTypes()
Return all entity type configs with push enabled.
Parameters
$push_type:
null|mixed $entity_type:
Return value
array
File
- src/
Entity/ Flow.php, line 1052
Class
- Flow
- Defines the "Content Sync - Flow" entity.
Namespace
Drupal\cms_content_sync\EntityCode
public function getPushedEntityTypes($push_type = null, $entity_type = null) {
$pushed_entity_types = [];
$entity_types = $this
->getEntityTypeConfig();
foreach ($entity_types as $key => $entity_type) {
if ($entity_type && $key !== $entity_type) {
continue;
}
if (is_null($push_type) && PushIntent::PUSH_DISABLED != $entity_type['export']) {
$pushed_entity_types[$key] = $entity_type;
}
elseif ($entity_type['export'] == $push_type) {
$pushed_entity_types[$key] = $entity_type;
}
}
return $pushed_entity_types;
}