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?


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.

  • So is it akin to TAGS? No functional purpose except for categorization? – Gleb Varenov Aug 13 '14 at 5:51
  • From all of my past experience that is what I gathered. – FatGuyLaughing Aug 20 '14 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. – Gleb Varenov Aug 28 '14 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. – FatGuyLaughing Aug 28 '14 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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