Proposed resolution
One option is to add a parameter or a constant value of an action class instance ($pass_rows) and check if it equals TRUE.
Second option is to create a new plugin type for Views Bulk Operations action that would extend Drupal\Core\Action\ConfigurableActionBase and create additional annotation for this setting.
For now I'd use the first solution, as it'd be much simplier and wouldn't cause the need to create a new plugin type, all would be in core Action plugin and only one plugin manager service (core plugin.manager.action) would have to be injected to ViewsBulkOperationsBulkForm and ViewsBulkOperationsActionProcessor
Just a thought: Can a plugin manager get plugins of 2 different types? That'd make things much easier..
Comments
Comment #3
graber commentedNow VBO action has an additional annotation:
pass_view- if set toTRUE, the entire view object will be available as the action parameter and selected results can be accessed at$view->result(check README.txt and example module).TODO: multilanguage support.Comment #5
graber commentedComment #6
graber commentedNo feedback for over 1 month and works as planned on all my environments, setting status to "fixed".
Comment #8
mpp commentedpass_view does not seem to support passing custom parameters like the current node ID used in an argument.
Comment #9
graber commented@mpp, does the problem still occur? If so, can you create a separate issue?
Generally when the view is rebuilt from the action processor, parameters are applied to it and also saved in the action
$contextparameter.