You are here

public function AcquiaContenthubAuditCommands::contenthubAuditSubscriberExecuteManifest in Acquia Content Hub 8

Executes a Manifest file.

@command acquia:contenthub-audit-subscriber-execute-manifest @aliases ach-asem,ach-audit-subscriber-exe-manifest

Parameters

string $manifest_file: Filename including path to write the manifest to.

string $output_manifest_file: Filename including path to write the resulting manifest after execution.

Throws

\Exception

File

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

Class

AcquiaContenthubAuditCommands
A Drush commandfile.

Namespace

Drupal\acquia_contenthub_audit\Commands

Code

public function contenthubAuditSubscriberExecuteManifest(string $manifest_file, string $output_manifest_file) {
  if (!$this
    ->io()
    ->confirm(sprintf('Are you sure you want to execute Manifest file "%s" and write its resulting output to "%s"? Please make sure you make a database backup first. There is no way back from this action!', $manifest_file, $output_manifest_file))) {
    return;
  }
  $this
    ->fileExistsOrDirectoryIsWritable($manifest_file);
  $this
    ->fileExistsOrDirectoryIsWritable($output_manifest_file);
  $audit = $this
    ->getSubscriberAudit();
  $audit
    ->executeManifest($manifest_file, $output_manifest_file);
}