You are here

public function AcquiaContenthubAuditCommands::contenthubAuditSubscriber in Acquia Content Hub 8

Checks imported entities and compares them to Content Hub.

@option types Comma separated list of entity types to search and delete.

@command acquia:contenthub-audit-subscriber @aliases ach-as,ach-audit-subscriber

Parameters

string $manifest_file: The File name including path to write the manifest to.

array $options: An associative array of options whose values come from cli, aliases, config, etc.

Throws

\Exception

File

acquia_contenthub_audit/src/Commands/AcquiaContenthubAuditCommands.php, line 40

Class

AcquiaContenthubAuditCommands
A Drush commandfile.

Namespace

Drupal\acquia_contenthub_audit\Commands

Code

public function contenthubAuditSubscriber(string $manifest_file, array $options = [
  'types' => '',
]) {
  $this
    ->fileExistsOrDirectoryIsWritable($manifest_file);
  $audit = $this
    ->getSubscriberAudit();
  $entity_type_ids = array_filter(explode(',', $options['types']));
  $audit
    ->generateManifest($manifest_file, $entity_type_ids);
}