0

When exporting a rule from Rules module you get some serialized representation of that rule. I understand everything but the 'OWNER' property in the export string - it has 'rules' value, but what does it mean specifically?

If I want store this rule in code within my module, do I need to change this value to 'module_name'? What are the implications here?

1 Answer 1

0

OWNER means what module provided this rule. The reason for this is so we have a good way for contrib modules like drupal_commerce to have a section in their administrative area to only show an interface for their rules and not ALL rules.

4
  • So is it akin to TAGS? No functional purpose except for categorization? Commented Aug 13, 2014 at 5:51
  • From all of my past experience that is what I gathered. Commented Aug 20, 2014 at 14:04
  • I'd like to add one less-than-obvious consequence of this behavior that gave me troubles. If you change 'OWNER' to something other than 'rules' you lose the ability to see/manipulate it through the standard Rules UI interface. So, beware. Commented Aug 28, 2014 at 8:21
  • Yes you will lose it via the UI. I'm sorry I thought I had mentioned that above. Rules' UI needs to be updated so that it is the catch all for any Rule regardless of OWNER. Commented Aug 28, 2014 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.