Problem/Motivation
Cloned this issue: https://www.drupal.org/project/views_bulk_operations/issues/3065159
and created a merge request.
Would like the ability to override the finished message for the batch, and also disable it in certain cases.
Steps to reproduce
Creating a custom VBO plugin and after execution finishes a default message of "Action processing results:" displays which in some cases is not desired.
Proposed resolution
You can override the message in your action by overriding the `finished` method defined in ViewsBulkOperationsActionCompletedTrait that is a part of ViewsBulkOperationsActionBase
This method is used as the batch finished callback, so it brings a bit more possibilities than message override only :)
Remaining tasks
Need review, and also confirmation.
User interface changes
None.
API changes
Adds the ability to override finished messaging by implementing the ViewsBulkOperationsMessageInterface
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Screenshot 2021-05-21 at 14.01.10.png | 78.53 KB | graber |
Issue fork views_bulk_operations-3207304
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
Bits8myBytes commentedComment #4
graber commentedA few things:
Comment #5
Bits8myBytes commentedThanks for such a fast response, I actually looked more into it and although what I originally did worked for me it was not ideal. I refactored the approach, added unit testing to the new message override logic, added option for drush message override, and added a sample test plugin with Kernel test.
Comment #6
Bits8myBytes commentedComment #7
Bits8myBytes commentedComment #8
scott.whittaker commentedSorry, is there a way to get these merge requests in patch form for adding to a composer.json or are they not meant to be tested until complete?
Comment #9
graber commented@scott

Comment #10
graber commentedHmm, I see I'm not getting notified on issue updates that happen in merge requests.. sorry @Bits8myBytes, I'll check this out again sometime soon.
Comment #11
graber commentedComment #12
graber commentedComment #13
graber commentedAlso, apologies @Bits8myBytes for taking over like this.. I thought it'd be a good way to spend half of my Saturday for once and didn't want this to get out of hand. I hope it works fine outside of my testing scope as well.
Comment #14
graber commentedComment #15
graber commentedThis'll also need to be included in the docs.
Comment #17
graber commented