|
Drupal example source code file (rules_test.module)
The rules_test.module Drupal example source code
<?php
// $Id: rules_test.module,v 1.1.2.4 2009/04/19 15:03:43 fago Exp $
/**
* @file Rules engine testing module
*/
/**
* Returns the log and clears it afterwards
*/
function rules_test_show_log(&$error) {
global $_rules_log;
if (is_array($_rules_log) && count($_rules_log)) {
$i = 0;
$msg = _rules_show_log($i, $_rules_log, $error);
$_rules_log = NULL;
return $msg;
}
return FALSE;
}
/**
* Makes sure the rules engine doesn't clean up the log, so that we can access it
*/
function rules_test_keep_rules_log() {
global $_rules_exec_log;
if (!isset($_rules_exec_log)) {
$_rules_exec_log = array();
}
$_rules_exec_log['rules_test_keep_log'] = 'rules_test_keep_log';
}
/**
* Cleans up
*/
function rules_test_done() {
global $_rules_exec_log;
if (isset($_rules_exec_log)) {
unset($_rules_exec_log['rules_test_keep_log']);
}
}
Other Drupal examples (source code examples)Here is a short list of links related to this Drupal rules_test.module source code file: |
"Drupal" is a registered trademark of Dries Buytaert.
our drupal tutorials and examples
Sponsored by:
Mat-Su Valley Programming (Wasilla and Palmer, Alaska)
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.