Created
September 2, 2016 18:27
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* File: ./custom/Extension/modules/<Module>/Ext/Vardefs */ | |
$dictionary['Account']['activity_enabled'] = false; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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