You are here

public static function MigratePush::getAcquiaContentHubConfigrations in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 8 modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigratePush::getAcquiaContentHubConfigrations()
  2. 2.0.x modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php \Drupal\cms_content_sync_migrate_acquia_content_hub\Form\MigratePush::getAcquiaContentHubConfigrations()

Get Entity Type configurations of the Acquia Content Hub.

Return value

array

1 call to MigratePush::getAcquiaContentHubConfigrations()
MigratePush::createFlow in modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php

File

modules/cms_content_sync_migrate_acquia_content_hub/src/Form/MigratePush.php, line 148

Class

MigratePush
Content Sync advanced debug form.

Namespace

Drupal\cms_content_sync_migrate_acquia_content_hub\Form

Code

public static function getAcquiaContentHubConfigrations() {
  $entity_types = \Drupal::service('acquia_contenthub.entity_manager')
    ->getAllowedEntityTypes();
  $content_hub_configurations = [];
  foreach ($entity_types as $entity_type_key => $entity_type) {
    $contenthub_entity_config_id = \Drupal::service('acquia_contenthub.entity_manager')
      ->getContentHubEntityTypeConfigurationEntity($entity_type_key);
    foreach ($entity_type as $bundle_key => $bundle) {
      $content_hub_configurations[$entity_type_key][$bundle_key] = $contenthub_entity_config_id ? $contenthub_entity_config_id
        ->isEnableIndex($bundle_key) : FALSE;
    }
  }
  return $content_hub_configurations;
}