You are here

public function CliService::configuration_export in CMS Content Sync 8

Same name in this branch
  1. 8 src/Cli/CliService.php \Drupal\cms_content_sync\Cli\CliService::configuration_export()
  2. 8 modules/cms_content_sync_developer/src/Cli/CliService.php \Drupal\cms_content_sync_developer\Cli\CliService::configuration_export()
Same name and namespace in other branches
  1. 2.1.x modules/cms_content_sync_developer/src/Cli/CliService.php \Drupal\cms_content_sync_developer\Cli\CliService::configuration_export()
  2. 2.0.x modules/cms_content_sync_developer/src/Cli/CliService.php \Drupal\cms_content_sync_developer\Cli\CliService::configuration_export()

Export the configuration to the Sync Core.

Parameters

$io:

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

modules/cms_content_sync_developer/src/Cli/CliService.php, line 21

Class

CliService

Namespace

Drupal\cms_content_sync_developer\Cli

Code

public function configuration_export($io) {
  $flows = Flow::getAll(FALSE);
  foreach ($flows as $flow) {

    // Get all entity type configurations.
    $entity_type_bundle_configs = $flow
      ->getEntityTypeConfig(NULL, NULL, TRUE);

    // Update versions.
    foreach ($entity_type_bundle_configs as $config) {
      $flow
        ->updateEntityTypeBundleVersion($config['entity_type_name'], $config['bundle_name']);
      $flow
        ->resetVersionWarning();
    }
  }
  $io
    ->text('Flows updated');
}