public function Flow::getEntityTypesToPull in CMS Content Sync 8
Same name and namespace in other branches
- 2.0.x src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow::getEntityTypesToPull()
Return all entity type configs with pull enabled.
Parameters
$pull_type:
null|mixed $entity_type:
Return value
array
File
- src/
Entity/ Flow.php, line 1062
Class
- Flow
- Defines the "Content Sync - Flow" entity.
Namespace
Drupal\cms_content_sync\EntityCode
public function getEntityTypesToPull($pull_type = null, $entity_type = null) {
$pulled_entity_types = [];
$entity_types = $this
->getEntityTypeConfig();
foreach ($entity_types as $key => $entity_type) {
if (is_null($pull_type) && PullIntent::PULL_DISABLED != $entity_type['import']) {
$pulled_entity_types[$key] = $entity_type;
}
elseif ($entity_type['import'] == $pull_type) {
$pulled_entity_types[$key] = $entity_type;
}
}
return $pulled_entity_types;
}