I recently had the project to replicate multiple nodes to new nodes with the same creation date. If we use VBO there are currently no way of passing a variable along the action call.
I have included a patch that handles this scenario. However, there must be a better way of handling that so someone could receive the parameter in the HOOK_replicate_entity_alter function.
| Comment | File | Size | Author |
|---|---|---|---|
| replicate_ui-action_parameters.patch | 571 bytes | jonathanbardo |
Comments
Comment #1
jonathanbardo commentedComment #2
btopro commentedI'm not entirely sure what this patch does since I don't know the scenario where you need info from VBO. That said, this should work with repliate_entity_alter because it's called before replicate_entity which will perform the alter. Also it's setting the field on the entity which is passed into replicate_entity so I think it'll be available then via the action_params property correct?
Comment #3
jonathanbardo commentedSo basically I'm hooking into the confirm form of VBO to add a datepicker. This dates needs to be sent to the action somehow and is actually part of the $context argument which isn't passed to replicate_entity() and that's mostly why I couldn't use replicate_entity_alter().
Comment #4
btopro commentedAhh, misunderstood your original post. Committed to dev