class CMSContentSyncDeveloperCommands in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 modules/cms_content_sync_developer/src/Commands/CMSContentSyncDeveloperCommands.php \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands
- 2.1.x modules/cms_content_sync_developer/src/Commands/CMSContentSyncDeveloperCommands.php \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands
Content Sync Developer Drush Commands.
Hierarchy
- class \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of CMSContentSyncDeveloperCommands
1 string reference to 'CMSContentSyncDeveloperCommands'
- drush.services.yml in modules/cms_content_sync_developer/ drush.services.yml 
- modules/cms_content_sync_developer/drush.services.yml
1 service uses CMSContentSyncDeveloperCommands
- cms_content_sync_developer.commands in modules/cms_content_sync_developer/ drush.services.yml 
- \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands
File
- modules/cms_content_sync_developer/ src/ Commands/ CMSContentSyncDeveloperCommands.php, line 11 
Namespace
Drupal\cms_content_sync_developer\CommandsView source
class CMSContentSyncDeveloperCommands extends DrushCommands {
  /**
   * The interoperability cli service.
   *
   * @var \Drupal\cms_content_sync_developer\Cli\CliService
   */
  protected $cliService;
  /**
   * CMS Content Sync constructor.
   *
   * @param \Drupal\cms_content_sync_developer\Cli\CliService $cliService
   *   The CLI service which allows interoperability.
   */
  public function __construct(CliService $cliService) {
    $this->cliService = $cliService;
    parent::__construct();
  }
  /**
   * @return \Symfony\Component\Console\Style\SymfonyStyle|ICLIIO
   */
  protected function io() {
    return parent::io();
  }
  /**
   * Export the configuration to the Sync Core.
   *
   * @command cms_content_sync_developer:update-flows
   * @aliases csuf
   */
  public function configuration_export() {
    $this->cliService
      ->configuration_export($this
      ->io());
  }
  /**
   * Force the deletion of entities and skip the syndication.
   *
   * @command cms_content_sync_developer:force-entity-deletion
   *
   * @aliases csfed
   *
   * @param string $entity_type
   *   The entity type the entities should be deleted for.
   * @param array $options
   *
   * @options bundle
   *  The bundle the entities should be deleted for.
   * @options entity_uuid
   *  The entities uuid that should be deleted.
   *
   * @usage cms_content_sync_developer:force_entity_deletion node --entity_uuid="06d1d5b8-5583-4929-9f7c-c85cfe59440b"
   *  Force delete the node having the uuid: "06d1d5b8-5583-4929-9f7c-c85cfe59440b".
   * @usage cms_content_sync_developer:force_entity_deletion node --bundle="basic_page"
   *  Force delete all nodes having the bundle basic_page.
   *
   * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
   * @throws \Drupal\Core\Entity\EntityStorageException
   * @throws \Drush\Exceptions\UserAbortException
   */
  public function force_entity_deletion($entity_type, $options = [
    'bundle' => NULL,
    'entity_uuid' => NULL,
  ]) {
    $this->cliService
      ->force_entity_deletion($this
      ->io(), $entity_type, $options);
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| CMSContentSyncDeveloperCommands:: | protected | property | The interoperability cli service. | |
| CMSContentSyncDeveloperCommands:: | public | function | Export the configuration to the Sync Core. | |
| CMSContentSyncDeveloperCommands:: | public | function | Force the deletion of entities and skip the syndication. | |
| CMSContentSyncDeveloperCommands:: | protected | function | ||
| CMSContentSyncDeveloperCommands:: | public | function | CMS Content Sync constructor. | 
