Add upgrade for label to name conversion
[civicrm-core.git] / CRM / Event / Page / List.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * Display a list of events on a page
14 */
15 class CRM_Event_Page_List extends CRM_Core_Page {
16
17 public function run() {
18 $id = CRM_Utils_Request::retrieveValue('id', 'Positive', NULL, FALSE, 'GET');
19 $type = CRM_Utils_Request::retrieveValue('type', 'Positive', 0);
20 $start = CRM_Utils_Request::retrieveValue('start', 'Positive', 0);
21 $end = CRM_Utils_Request::retrieveValue('end', 'Positive', 0);
22
23 $info = CRM_Event_BAO_Event::getCompleteInfo($start, $type, $id, $end);
24
25 $this->assign('events', $info);
26
27 // @todo Move this to eventcart extension
28 // check if we're in shopping cart mode for events
29 if ((bool) Civi::settings()->get('enable_cart')) {
30 $this->assign('registration_links', TRUE);
31 }
32
33 return parent::run();
34 }
35
36 }