showroom.rules_defaults.inc 887 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * showroom.rules_defaults.inc
  5. */
  6. /**
  7. * Implements hook_default_rules_configuration().
  8. */
  9. function showroom_default_rules_configuration() {
  10. $items = array();
  11. $items['rules_auto_tag_news_with_showroom'] = entity_import('rules_config', '{ "rules_auto_tag_news_with_showroom" : {
  12. "LABEL" : "auto tag news with showroom",
  13. "PLUGIN" : "reaction rule",
  14. "REQUIRES" : [ "rules" ],
  15. "ON" : [ "node_presave" ],
  16. "IF" : [
  17. { "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "breve" : "breve" } } } },
  18. { "user_has_role" : { "account" : [ "node:author" ], "roles" : { "value" : { "15" : "15" } } } }
  19. ],
  20. "DO" : [
  21. { "data_set" : {
  22. "data" : [ "node:field-showroom" ],
  23. "value" : [ "node:author:field-showroom" ]
  24. }
  25. }
  26. ]
  27. }
  28. }');
  29. return $items;
  30. }