Skip to content
Snippets Groups Projects
Commit 5e02ef68 authored by Wolfgang Ziegler's avatar Wolfgang Ziegler
Browse files

added a simple example rule

parent b981c5ec
No related branches found
No related tags found
No related merge requests found
<?php
// $Id$
/**
* @file Rules configuration forms for the node module
*/
......
<?php
//$Id$
// $Id$
/**
* @file Rules configuration forms for the user module
*/
......
......@@ -6,9 +6,86 @@
function rules_rules_defaults() {
$rules = array();
$config =
array (
'rules' =>
array (
'rules_1' =>
array (
'#type' => 'rule',
'#set' => 'event_node_view',
'#label' => 'Example rule',
'#active' => 1,
'#weight' => '0',
'#name' => 'rules_1',
'#conditions' =>
array (
0 =>
array (
'#settings' =>
array (
'#argument map' =>
array (
'node' => 'node',
),
'type' =>
array (
'page' => 'page',
),
),
'#info' =>
array (
'label' => 'Content is Page',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'help' => 'Evaluates to TRUE, if the given content has one of the selected content types.',
'module' => 'Node',
),
'#name' => 'rules_condition_content_is_type',
'#type' => 'condition',
),
),
'#actions' =>
array (
0 =>
array (
'#type' => 'action',
'#name' => 'rules_action_node_publish',
'#info' =>
array (
'label' => 'Publish content',
'label callback' => false,
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'module' => 'Node',
),
'#settings' =>
array (
'#argument map' =>
array (
'node' => 'node',
),
'published' => 1,
),
),
),
),
),
);
return array('rules' => $rules,
return $config + array(
'rule_sets' => array(
'rules_set_1' => array(
'label' => 'Rule Set Example working with content',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment