-
Notifications
You must be signed in to change notification settings - Fork 0
/
ding_news.rules_defaults.inc
59 lines (58 loc) · 2.4 KB
/
ding_news.rules_defaults.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @file
* ding_news.rules_defaults.inc
*/
/**
* Implements hook_default_rules_configuration().
*/
function ding_news_default_rules_configuration() {
$items = array();
$items['rules_ding_news_comment_update'] = entity_import('rules_config', '{ "rules_ding_news_comment_update" : {
"LABEL" : "Ding news comment update",
"PLUGIN" : "reaction rule",
"TAGS" : [ "Ding news" ],
"REQUIRES" : [ "rules", "cache_actions", "comment" ],
"ON" : [ "comment_delete", "comment_update", "comment_insert" ],
"IF" : [
{ "node_is_of_type" : {
"node" : [ "comment:node" ],
"type" : { "value" : { "ding_news" : "ding_news" } }
}
}
],
"DO" : [
{ "cache_actions_action_clear_panels_pane_cache" : { "panes" : { "value" : { "task:node_view_panel_context:node_view:new-2" : "task:node_view_panel_context:node_view:new-2" } } } }
]
}
}');
$items['rules_ding_news_node_update'] = entity_import('rules_config', '{ "rules_ding_news_node_update" : {
"LABEL" : "Ding news node update",
"PLUGIN" : "reaction rule",
"TAGS" : [ "ding_news" ],
"REQUIRES" : [ "rules", "cache_actions" ],
"ON" : [ "node_insert", "node_update", "node_delete" ],
"IF" : [
{ "node_is_of_type" : {
"node" : [ "node" ],
"type" : { "value" : { "ding_news" : "ding_news" } }
}
}
],
"DO" : [
{ "cache_actions_action_clear_panels_pane_cache" : { "panes" : { "value" : {
"task:term_view_panel_context:term_view:new-2" : "task:term_view_panel_context:term_view:new-2",
"subtask:page_ding_frontpage_panel_context:page:ding_frontpage:new-1" : "subtask:page_ding_frontpage_panel_context:page:ding_frontpage:new-1",
"subtask:page_ding_news_panel_context:page:ding_news:new-4" : "subtask:page_ding_news_panel_context:page:ding_news:new-4",
"subtask:page_ding_news_library_panel_context:page:ding_news_library:new-4" : "subtask:page_ding_news_library_panel_context:page:ding_news_library:new-4",
"task:node_view_panel_context_3:node_view:new-2" : "task:node_view_panel_context_3:node_view:new-2",
"task:node_view_panel_context:node_view:new-2" : "task:node_view_panel_context:node_view:new-2"
}
}
}
}
]
}
}');
return $items;
}