From 65bccf019c2da3344860edb585a239c7a425220e Mon Sep 17 00:00:00 2001 From: Adam Vessey <adam@discoverygarden.ca> Date: Mon, 15 Aug 2022 10:36:06 -0300 Subject: [PATCH] Something of namespacing the child-specific batch... ... 'cause need to slap together a media-specific batch similarly? --- islandora.services.yml | 2 +- .../{BatchProcessor.php => ChildBatchProcessor.php} | 6 +++--- src/Form/AddChildrenWizard/FileSelectionForm.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/Form/AddChildrenWizard/{BatchProcessor.php => ChildBatchProcessor.php} (95%) diff --git a/islandora.services.yml b/islandora.services.yml index e48818b9..1dbed028 100644 --- a/islandora.services.yml +++ b/islandora.services.yml @@ -60,7 +60,7 @@ services: tags: - { name: event_subscriber } islandora.upload_children.batch_processor: - class: Drupal\islandora\Form\AddChildrenWizard\BatchProcessor + class: Drupal\islandora\Form\AddChildrenWizard\ChildBatchProcessor arguments: - '@entity_type.manager' - '@database' diff --git a/src/Form/AddChildrenWizard/BatchProcessor.php b/src/Form/AddChildrenWizard/ChildBatchProcessor.php similarity index 95% rename from src/Form/AddChildrenWizard/BatchProcessor.php rename to src/Form/AddChildrenWizard/ChildBatchProcessor.php index 2e4a84bf..ccd07b99 100644 --- a/src/Form/AddChildrenWizard/BatchProcessor.php +++ b/src/Form/AddChildrenWizard/ChildBatchProcessor.php @@ -14,7 +14,7 @@ use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; /** * Children addition batch processor. */ -class BatchProcessor { +class ChildBatchProcessor { use FieldTrait; @@ -171,8 +171,8 @@ class BatchProcessor { foreach ($info as $id => $count) { $this->messenger()->addWarning($this->formatPlural( $count, - '1 validation error present in <a href=":uri">bulk created entity of type %type, with ID %id</a>.', - '@count validation errors present in <a href=":uri">bulk created entity of type %type, with ID %id</a>.', + '1 validation error present in <a target="_blank" href=":uri">bulk created entity of type %type, with ID %id</a>.', + '@count validation errors present in <a target="_blank" href=":uri">bulk created entity of type %type, with ID %id</a>.', [ '%type' => $entity_type, ':uri' => Url::fromRoute("entity.{$entity_type}.canonical", [$entity_type => $id])->toString(), diff --git a/src/Form/AddChildrenWizard/FileSelectionForm.php b/src/Form/AddChildrenWizard/FileSelectionForm.php index 084eb5e5..2e505c09 100644 --- a/src/Form/AddChildrenWizard/FileSelectionForm.php +++ b/src/Form/AddChildrenWizard/FileSelectionForm.php @@ -43,9 +43,9 @@ class FileSelectionForm extends FormBase { /** * The batch processor service. * - * @var \Drupal\islandora\Form\AddChildrenWizard\BatchProcessor|null + * @var \Drupal\islandora\Form\AddChildrenWizard\ChildBatchProcessor|null */ - protected ?BatchProcessor $batchProcessor; + protected ?ChildBatchProcessor $batchProcessor; /** * {@inheritdoc}