Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disabling ActivityStream on a specific module (Accounts) and global logic hooks that support functionality.
<?php
/* File: ./custom/Extension/modules/<Module>/Ext/Vardefs */
$dictionary['Account']['activity_enabled'] = false;
?>
<?php
/* File: ./custom/Extension/application/Ext/LogicHooks/rmashooks.ext.php */
$hook_types = array(
'after_save',
'after_delete',
'after_undelete',
'after_relationship_add',
'after_relationship_delete'
);
foreach ($hook_types as $hook_type)
{
if(isset($hook_array[$hook_type]))
{
foreach ($hook_array[$hook_type] as $key => $hook)
{
if(in_array("activitystream", $hook))
unset($hook_array[$hook_type][$key]);
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment