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
21 * This is page is for Event Dashboard
23 class CRM_Event_Page_DashBoard
extends CRM_Core_Page
{
26 * Heart of the viewing process. The runner gets all the meta data for
27 * the contact and calls the appropriate type of page to view.
31 public function preProcess() {
32 CRM_Utils_System
::setTitle(ts('CiviEvent'));
34 $eventSummary = CRM_Event_BAO_Event
::getEventSummary();
35 $enableCart = Civi
::settings()->get('enable_cart');
36 $eventSummary['tab'] = CRM_Event_Page_ManageEvent
::tabs($enableCart);
38 $actionColumn = FALSE;
39 if (!empty($eventSummary) &&
40 isset($eventSummary['events']) &&
41 is_array($eventSummary['events'])
43 foreach ($eventSummary['events'] as $e) {
44 if (isset($e['isMap']) ||
isset($e['configure'])) {
51 $this->assign('actionColumn', $actionColumn);
52 $this->assign('eventSummary', $eventSummary);
56 * the main function that is called when the page loads,
57 * it decides the which action has to be taken for the page.
61 public function run() {
64 $controller = new CRM_Core_Controller_Simple('CRM_Event_Form_Search', ts('events'), NULL);
65 $controller->setEmbedded(TRUE);
67 $controller->set('limit', 10);
68 $controller->set('force', 1);
69 $controller->set('context', 'dashboard');
70 $controller->process();