Created
March 26, 2012 15:32
-
-
Save mlutfy/2205960 to your computer and use it in GitHub Desktop.
Static CiviCRM dashboard
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
/** | |
* Implements hook_civicrm_dashboard(). | |
* | |
* Replaces the CiviCRM dashboard with only the Activity dashlet. | |
* Avoids having users setup their dashboard, and this is the only dashlet available in our installation. | |
* | |
* For more information: | |
* http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmdashboard | |
*/ | |
function mymodule_civicrm_dashboard($contactID, &$contentPlacement) { | |
$contentPlacement = CRM_Utils_Hook::DASHBOARD_REPLACE; | |
require_once 'CRM/Dashlet/Page/Activity.php'; | |
ob_start(); | |
$dashlet = new CRM_Dashlet_Page_Activity(); | |
$dashlet->run(); | |
$output = ob_get_contents(); | |
ob_end_clean(); | |
return array( | |
ts('Activities') => $output, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment