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.

CommentFileSizeAuthor
replicate_ui-action_parameters.patch571 bytesjonathanbardo

Comments

jonathanbardo’s picture

Assigned: jonathanbardo » Unassigned
btopro’s picture

I'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?

jonathanbardo’s picture

So 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().

btopro’s picture

Status: Needs work » Fixed

Ahh, misunderstood your original post. Committed to dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.