You are here

public function FlowControllerBase::getEntityTypesToPull in CMS Content Sync 2.1.x

@inheritDoc

File

src/Controller/FlowControllerBase.php, line 27

Class

FlowControllerBase

Namespace

Drupal\cms_content_sync\Controller

Code

public function getEntityTypesToPull($pull_type = null) {
  $pulled_entity_types = [];
  $entity_types = $this
    ->getEntityTypeConfig();
  foreach ($entity_types as $entity_type_name => $bundles) {
    foreach ($bundles as $bundle_name => $config) {
      if (is_null($pull_type) ? PullIntent::PULL_DISABLED != $config['import'] : $config['import'] == $pull_type) {
        $pulled_entity_types[$entity_type_name][$bundle_name] = $config;
      }
    }
  }
  return $pulled_entity_types;
}