Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
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 | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | * $Id$ |
17 | * | |
18 | */ | |
19 | ||
20 | /** | |
21 | * This class is for building event(participation) block on user dashboard | |
22 | */ | |
23 | class CRM_Event_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard { | |
24 | ||
25 | /** | |
fe482240 | 26 | * List participations for the UF user. |
6a488035 | 27 | * |
6a488035 | 28 | */ |
00be9182 | 29 | public function listParticipations() { |
9f6f062c DL |
30 | $controller = new CRM_Core_Controller_Simple( |
31 | 'CRM_Event_Form_Search', | |
32 | ts('Events'), | |
33 | NULL, | |
34 | FALSE, FALSE, TRUE, FALSE | |
35 | ); | |
6a488035 TO |
36 | $controller->setEmbedded(TRUE); |
37 | $controller->reset(); | |
38 | $controller->set('context', 'user'); | |
39 | $controller->set('cid', $this->_contactId); | |
40 | $controller->set('force', 1); | |
41 | $controller->process(); | |
42 | $controller->run(); | |
43 | } | |
44 | ||
45 | /** | |
dc195289 | 46 | * the main function that is called when the page |
6a488035 TO |
47 | * loads, it decides the which action has to be taken for the page. |
48 | * | |
6a488035 | 49 | */ |
00be9182 | 50 | public function run() { |
6a488035 TO |
51 | parent::preProcess(); |
52 | $this->listParticipations(); | |
53 | } | |
96025800 | 54 | |
6a488035 | 55 | } |