You are here

public function CMSContentSyncDeveloperCommands::force_entity_deletion in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x modules/cms_content_sync_developer/src/Commands/CMSContentSyncDeveloperCommands.php \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands::force_entity_deletion()
  2. 2.0.x modules/cms_content_sync_developer/src/Commands/CMSContentSyncDeveloperCommands.php \Drupal\cms_content_sync_developer\Commands\CMSContentSyncDeveloperCommands::force_entity_deletion()

Force the deletion of entities and skip the syndication.

@command cms_content_sync_developer:force-entity-deletion

@aliases csfed

@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.

Parameters

string $entity_type: The entity type the entities should be deleted for.

array $options:

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

\Drupal\Core\Entity\EntityStorageException

\Drush\Exceptions\UserAbortException

File

modules/cms_content_sync_developer/src/Commands/CMSContentSyncDeveloperCommands.php, line 75

Class

CMSContentSyncDeveloperCommands
Content Sync Developer Drush Commands.

Namespace

Drupal\cms_content_sync_developer\Commands

Code

public function force_entity_deletion($entity_type, $options = [
  'bundle' => NULL,
  'entity_uuid' => NULL,
]) {
  $this->cliService
    ->force_entity_deletion($this
    ->io(), $entity_type, $options);
}