Skip to content

Instantly share code, notes, and snippets.

@elchele
Created September 2, 2016 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elchele/aed57306795cccc46adea444532b955f to your computer and use it in GitHub Desktop.
Save elchele/aed57306795cccc46adea444532b955f to your computer and use it in GitHub Desktop.
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