| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 1108 lines (35 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| rules_get_actions($key = 'all') X-Ref |
| Returns info about all defined actions |
| rules_get_conditions($key = 'all') X-Ref |
| Returns info about all defined conditions |
| rules_get_items($key = 'all') X-Ref |
| Returns info about all defined items |
| rules_get_data_types($key = 'all') X-Ref |
| Returns info about all defined data types |
| rules_get_item_defaults($item_type = 'rules') X-Ref |
| Returns all defined item defaults $item_type Which defaults to return, e.g. 'rules', 'rule_sets' or 'states' |
| rules_get_events($key = 'all') X-Ref |
| Returns info about all defined events |
| rules_get_rule_sets($key = NULL) X-Ref |
| Returns info about all rule sets, which includes events prefixed with 'event_'. param: $key If given, only the info about this rule set will be returned. |
| rules_get_event_sets() X-Ref |
| Returns info about all events prefixed with 'event_' to be a set. |
| rules_gather_data($name, $key = 'all', $alter = TRUE, $reset = FALSE) X-Ref |
| Gathers module definitions for the given name Used for collecting events, rules, actions and condtions from other modules param: $name The type of the data item to collect. This is also the name of the invoked hook. param: $key Whether to retrieve all definitions or only the one with the given key param: $alter Whether drupal_alter() should be invoked for this data param: $reset If the static cache should be reseted. Note that if set to true, nothing will be |
| rules_extract_property($elements, $key) X-Ref |
| Extracts the property with the given name while keeping the keys param: $key The name of the property to extract param: $elements An array of elements return: An array of extracted properties. |
| rules_get_rule_set($set_name, $reset = FALSE) X-Ref |
| Returns the rule set $set_name, which includes the set info and the rules. To improve performance rule sets are cached. param: $set_name The name of the set which should be returned. param: $reset May be set to true to clear the static $sets cache. return: Returns the set only containing active rules, ready for evaluation |
| _rules_get_rule_set_initialize(&$sets) X-Ref |
| Initializes inactive sets |
| _rules_get_rule_sets() X-Ref |
| Actually retrieves all active rules bypassing the cache |
| _rules_rule_is_active($rule) X-Ref |
| Helper for array_filter() |
| rules_clear_cache($immediate = TRUE) X-Ref |
| Clears the rule set cache param: $immediate If FALSE, the static cache will be kept until the next page load. |
| rules_flush_caches() X-Ref |
| Implementation of hook_flush_caches(). |
| rules_invoke_event() X-Ref |
| Invokes configured rules for the given event param: $event_name param: $args |
| rules_invoke_rule_set() X-Ref |
| Invokes configured rules for the given rule set param: $set_name The name of the rule set to invoke param: $args Further arguments as defined for the rule set |
| rules_evaluate_rule_set($set_name, $set, &$state, $skip_save = array() X-Ref |
| Evaluates the configured rules for the given rule set and evaluation state. This is used, when rule sets are invoked by action. So the action can set up a new state, working with the same variables. So the original execution state can take over variable saving. param: $set_name The name of the rule set to invoke param: $set The rule set, as returned from rules_get_rule_set(). param: $state The evaluation state. param: $skip_save An optional array of names of variables, for which saving should |
| rules_evaluate_elements($elements, &$state) X-Ref |
| Evaluates the elements in a recursive way The elements are a tree of rules, conditions, actions and logical operations (AND, OR,..) Each element is executed by using rules_execute_element(). Elements can use '#execute' to set their execution handler, which can be used to to customize the evaluation of the children. E.g. the element 'OR' does this and evaluates to TRUE if at least one of its children evaluate to TRUE. param: $elements An array of elements to evaluate param: $state The current evaluation state |
| rules_sort_children(&$element) X-Ref |
| Sorts the children of the elements by maintaining the order of the elements if the weight is equal |
| rules_sort_elements(&$elements) X-Ref |
| Recursively sorts the elements with rules_sort_children(). |
| _rules_element_defaults(&$element) X-Ref |
| Makes sure the element defaults are applied |
| rules_execute_element(&$element, &$state) X-Ref |
| Executes the element by invoking the element type's execution handler param: $elements An array of elements to process param: $state The current evaluation state return: The execution result, or FALSE if there is no valid execution handler. |
| rules_execute_rule(&$element, &$state) X-Ref |
| Execution handler for rules |
| rules_execute_or(&$elements, &$state) X-Ref |
| Execution handler for the OR element Evaluates to TRUE if at least one children evaluate to TRUE.. |
| rules_execute_and(&$elements, &$state) X-Ref |
| Execution handler for the AND element Evaluates to TRUE if all children evaluate to TRUE.. |
| rules_execute_action($element, &$state) X-Ref |
| Execution handler for actions param: $element The action's configuration element param: $state The current evaluation state return: TRUE to let rules proceed wit executing actions, only FALSE if $result['#halt'] is set. |
| rules_execute_condition($element, &$state) X-Ref |
| Execution handler for conditions Note: An condition may not alter arguments param: $element The condition's configuration element param: $state The current evaluation state return: The execution result of the condition, or if it is no valid condition FALSE. |
| rules_log($message, $error = FALSE) X-Ref |
| Writes the message into the log |
| _rules_log_set_invocation($message, $start = TRUE) X-Ref |
| Writes to the log and marks the entry to be the first one of a just started set |
| rules_elements() X-Ref |
| Implementation of hook_elements() Defines default values for all available properties of rules's element types Note that the #process handlers are only used by the form API, but not by the rules engine. |
| rules_init_element_info(&$element) X-Ref |
| Initiates the element info property (#info) of an element (actions, conditions,..). |
| rules_retrieve_element_info(&$element) X-Ref |
| Retrieves the element (actions, conditions,..) info. |
| rules_get_element_info(&$element) X-Ref |
| Returns the cached element info of the element. |
| rules_get_element_label(&$element) X-Ref |
| Gets the element's label |
| rules_element_invoke($element, $op = '', $params, $error = TRUE) X-Ref |
| Invokes an element specific function. E.g. this is used for invoking actions. param: $op The operation to invoke. If one is given, it will be appended to the param: $params An array of parameters which should be passed to the invoked param: $error Whether an error should be generated, when no implementation is found. return: FALSE, if no implementation is found. Else the return of the implementation will |
| rules_configure() X-Ref |
| A simple helping function, which eases the creation of rules Example use case: $conditions = rules_configure('OR', $condition1, conditions2); param: $op One supported operation like 'AND', 'OR'. If ommitted the passed elements param: $elements The elements to configure. |
| rules_use_condition($name, $params = array() X-Ref |
| Configures a condition for using in a rule param: $name The name of condition to create, as specified at hook_condition_info() param: $params An optional array of properties to add, e.g. #settings param: $label An optional label for the condition |
| rules_use_action($name, $params = array() X-Ref |
| Configures an action for using in a rule param: $name The name of action to create, as specified at hook_action_info() param: $params An optional array of properties to add, e.g. #settings param: $label An optional label for the action |
| _rules_element_set_label($element, $label = NULL) X-Ref |
| No description |
| rules_use_element($type, $params = array() X-Ref |
| Configures an element of type $type with the further properties $params |
| rules_show_log() X-Ref |
| Shows the log and clears it afterwards |
| _rules_show_log(&$i, $data, &$error) X-Ref |
| No description |
| rules_log_evaluated_rule($rule) X-Ref |
| Remembers the currently evaluated rules. With this information, recursion is prevented param: $rule The rule, which execution should be logged |
| rules_log_evaluation_clear($set_name) X-Ref |
| Clears the rule evaluation log for the given rule set. |
| rules_log_rule_is_evaluated($rule) X-Ref |
| Checks if the given rule is currently evaluated. param: $name The name of the rule, which execution should be logged |
| rules_log_evaluation_finished() X-Ref |
| Checks whether every rule evaluation is finished |
| rules_get_configured_items($item_type = 'rules', $reset = FALSE) X-Ref |
| Gets all configured items, regardless if defined by the admin or by a module param: $items Which items to get, e.g. 'rules' or 'rule_sets'. Use NULL when clearing the cache. param: Whether the cache should be cleared return: An array of configured items, where the structure of the item configuration |
| rules_item_save($item_type, $name, $item) X-Ref |
| Saves the given item to the database |
| rules_item_change_name($item_type, $old_name, $new_name) X-Ref |
| Change the name of a rules item. |
| rules_item_delete($item_type, $name) X-Ref |
| Deletes the given item from the database |
| rules_enable_items($item_type, $ret = array() X-Ref |
| Used to inform the rules engine about an added item type, so it can create the db table if necessary |
| rules_item_type_invoke($item_type, $op, $params = array() X-Ref |
| Invoke an item type specific function, which will be item types base appended with _$op. The parameters given in $params will be passed to this function. |
| rules_rules_item_info() X-Ref |
| Implementation of hook_rules_item_info |
| rules_error_missing_implementation($element) X-Ref |
| Shows an error message, that a module is missing. param: $element The element, for which the implementation is missing |
| rules_handle_error_msg($message, $variables, $rule_name = NULL) X-Ref |
| Handles a error message. If the user has permission to administer the rules engine, show him the error. Otherwise just log it. |
| array_intersect_key() X-Ref |
| Own version of array_intersect_key for php < 5.1 |
| rules_form_alter($form, $form_state, $form_id) X-Ref |
| Implementation of hook_form_alter() Clear the cache when a module is deactivated |
| rules_include($type = 'rules') X-Ref |
| Includes rules specific include files param: $type |
| _rules_include_get_files($type) X-Ref |
| No description |
| rules_after_build_include_files($form, $form_state) X-Ref |
| An form after build callback that can be used to include arbitrary files needed by the form. |
| rules_rule_format_upgrade($rule) X-Ref |
| Makes sure the rule is in the latest format. If not it will be upgraded automatically. |
| rules_token_list($type = 'all') X-Ref |
| Implementation of hook_token_list() We expose some simple types to token so that our simple rules variables can also be used by others when doing token replacement. |
| rules_token_values($type, $object = NULL, $options = array() X-Ref |
| Implementation of hook_token_values(). |
| rules_gmstrtotime($time) X-Ref |
| Convert a time string to a GMT (UTC) unix timestamp |
| rules_features_api() X-Ref |
| Implementation of hook_features_api(). |
| rules_import_hook($rule) X-Ref |
| Calls the import hook to allow modules to react on the import. |
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |