-
-
Save tracylemke/a1f463a62ee84499ce22436454b1a549 to your computer and use it in GitHub Desktop.
Disable Activity Stream on Sugar 7 - Application logic hook to disable writes everywhere and example of vardefs to disable module specific UI
This file contains 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 | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// custom/logichooks/application/afterEntryPoint.php | |
class afterEntryPoint | |
{ | |
public function disableActivityStream($event, $arguments) | |
{ | |
// disable activity stream | |
Activity::disable(); | |
} | |
} |
This file contains 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 | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// custom/Extension/modules/Contacts/Ext/Vardefs/acitivity_stream.php | |
$dictionary['Contact']['activity_enabled'] = false; |
This file contains 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 | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// custom/Extension/application/Ext/LogicHooks/installer.afterEntryPoint.php | |
$hook_version = 1; | |
$hook_array['after_entry_point'][] = array( | |
1, | |
'Disable activity stream on after entry point hook', | |
'custom/logichooks/application/afterEntryPoint.php', | |
'afterEntryPoint', | |
'disableActivityStream', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment