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
19 * This class is for building event(participation) block on user dashboard.
21 class CRM_Activity_Page_UserDashboard
extends CRM_Contact_Page_View_UserDashBoard
{
24 * List participations for the UF user.
28 public function listActivities() {
31 = new CRM_Core_Controller_Simple(
32 'CRM_Activity_Form_Search', ts('Activities'),
34 FALSE, FALSE, TRUE, FALSE
36 $controller->setEmbedded(TRUE);
38 $controller->set('context', 'user');
39 $controller->set('cid', $this->_contactId
);
40 // Limit to status "Scheduled" and "Available"
41 $controller->set('status', ['IN' => [1, 7]]);
42 $controller->set('activity_role', 2);
43 $controller->set('force', 1);
44 $controller->process();
51 * The main function that is called when the page loads.
53 * It decides the which action has to be taken for the page.
55 public function run() {
57 $this->listActivities();