Skip to content
Snippets Groups Projects
Commit b7df645b authored by Sean Madsen's avatar Sean Madsen
Browse files

Remove CiviRules hooks

* They have been moved to the CiviRules Guide:
  https://docs.civicrm.org/civirules/en/latest/
* Close #183
parent de9b25fc
No related branches found
No related tags found
No related merge requests found
# hook_civirules_alter_trigger_data
## Description
This hook is called for altering the trigger data object just before a
trigger is triggered.
## Definition
hook_civirules_alter_trigger_data(CRM_Civirules_TriggerData_TriggerData &$triggerData )
## Returns
- null
## Example
/**
* Implements hook_civirules_alter_trigger_data
*
* Adds custom data to the trigger data object
*/
function civirules_civirules_alter_trigger_data(CRM_Civirules_TriggerData_TriggerData &$triggerData) {
//also add the custom data which is passed to the pre hook (and not the post)
CRM_Civirules_Utils_CustomDataFromPre::addCustomDataToTriggerData($triggerData);
}
\ No newline at end of file
# hook_civirules_logger
## Description
This hook is called for return an object to do logging in CiviRules. The
object should be instance of \Psr\Log\LoggerInterface or null if you
want to disable the logging
## Definition
hook_civirules_logger(\Psr\Log\LoggerInterface &$logger=null)
## Returns
- null
## Example
The example below returns a database logger for civirules.
function civiruleslogger_civirules_logger(\Psr\Log\LoggerInterface &$logger=null) {
if (empty($logger)) {
$logger = new CRM_Civiruleslogger_DatabaseLogger();
}
}
\ No newline at end of file
......@@ -183,9 +183,6 @@ pages:
- hook_civicrm_tokens: hooks/hook_civicrm_tokens.md
- hook_civicrm_tokenValues: hooks/hook_civicrm_tokenValues.md
- hook_civicrm_unhandledException: hooks/hook_civicrm_unhandledException.md
- CiviRules hooks:
- hook_civirules_alter_trigger_data: hooks/hook_civirules_alter_trigger_data.md
- hook_civirules_logger: hooks/hook_civirules_logger.md
- Documentation:
- Writing Documentation: documentation/index.md
- Documenting Extensions: documentation/extensions.md
......
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