You are here

function flag_hook_test_default_rules_configuration in Flag 7.3

Implements hook_default_rules_configuration().

File

tests/flag_hook_test/flag_hook_test.module, line 162
flag_hook_test.module Test module for the hooks that Flag invokes.

Code

function flag_hook_test_default_rules_configuration() {
  $configs['flag_test_rule_flag'] = rules_import('{ "flag_test_rule" : {
      "LABEL" : "Flag test rule",
      "PLUGIN" : "reaction rule",
      "OWNER" : "rules",
      "REQUIRES" : [ "flag_hook_test", "flag" ],
      "ON" : { "flag_flagged_flag_hook_test_flag" : [] },
      "DO" : [ { "flag_test_action" : [] } ]
    }
  }');
  $configs['flag_test_rule_unflag'] = rules_import('{ "flag_test_rule" : {
      "LABEL" : "Flag test rule",
      "PLUGIN" : "reaction rule",
      "OWNER" : "rules",
      "REQUIRES" : [ "flag_hook_test", "flag" ],
      "ON" : { "flag_unflagged_flag_hook_test_flag" : [] },
      "DO" : [ { "flag_test_action" : [] } ]
    }
  }');
  return $configs;
}