I am working to get smsbulk working with rules (see my patch: http://drupal.org/node/987464#comment-3781306) but ran into an issue and wondered if you all might be able to help.

I want to get the argument object (like the one that is in the function views_bulk_operations_action(&$object, $context) ) so I can use it for token_replace. Right now I only have access to the object of the nodes (or users) that are in the view.

I know I could just override the fields with "Operation arguments" to get the rules arg object info, but thats kinda hackish integration.

This would also be useful for actions as well.

Let me know if you have any ideas.

Comments

that0n3guy’s picture

Category: support » feature
Status: Active » Patch (to be ported)
Issue tags: +patch
StatusFileSize
new2.95 KB

So, I needed the "original" object to do this, so here is a simple patch to do that.

infojunkie’s picture

Thanks for the patch. However, I'm not sure it's the right approach.

If I understand you correctly, you need to pass the Rules context (object that triggered the event + other variables loaded by Rules) to the action. If that's what you need, then it's on my roadmap.

that0n3guy’s picture

Yeah, thats what I needed. What I did seemed like a pretty simple solution for now.

infojunkie’s picture