assign($aName, $$aName); } //for contribution tabular View $buildTabularView = CRM_Utils_Array::value('showtable', $_GET, FALSE); $this->assign('buildTabularView', $buildTabularView); if ($buildTabularView) { return; } // Check for admin permission to see if we should include the Manage Contribution Pages action link $isAdmin = 0; if (CRM_Core_Permission::check('administer CiviCRM')) { $isAdmin = 1; } $this->assign('isAdmin', $isAdmin); } /** * the main function that is called when the page loads, * it decides the which action has to be taken for the page. * * @return null */ public function run() { $this->preProcess(); $controller = new CRM_Core_Controller_Simple('CRM_Contribute_Form_Search', ts('Contributions'), NULL ); $controller->setEmbedded(TRUE); $controller->set('limit', 10); $controller->set('force', 1); $controller->set('context', 'dashboard'); $controller->process(); $controller->run(); $chartForm = new CRM_Core_Controller_Simple('CRM_Contribute_Form_ContributionCharts', ts('Contributions Charts'), NULL ); $chartForm->setEmbedded(TRUE); $chartForm->process(); $chartForm->run(); CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'templates/CRM/Contribute/Page/DashBoard.js', 1, 'html-header'); return parent::run(); } }