3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Pledge_Page_UserDashboard
extends CRM_Contact_Page_View_UserDashBoard
{
20 * called when action is browse.
22 public function listPledges() {
23 $controller = new CRM_Core_Controller_Simple(
24 'CRM_Pledge_Form_Search',
27 FALSE, FALSE, TRUE, FALSE
29 $controller->setEmbedded(TRUE);
31 $controller->set('limit', 12);
32 $controller->set('cid', $this->_contactId
);
33 $controller->set('context', 'user');
34 $controller->set('force', 1);
35 $controller->process();
40 $honorParams = CRM_Pledge_BAO_Pledge
::getHonorContacts($this->_contactId
);
41 if (!empty($honorParams)) {
42 // assign vars to templates
43 $this->assign('pledgeHonorRows', $honorParams);
44 $this->assign('pledgeHonor', TRUE);
46 $session = CRM_Core_Session
::singleton();
47 $loggedUserID = $session->get('userID');
48 $this->assign('loggedUserID', $loggedUserID);
52 * the main function that is called when the page
53 * loads, it decides the which action has to be taken for the page.
55 public function run() {