Merge in 5.28
[civicrm-core.git] / CRM / Case / Page / CaseDetails.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 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 class CRM_Case_Page_CaseDetails extends CRM_Core_Page {
18
19 /**
20 * The main function that is called when the page loads.
21 *
22 * It decides the which action has to be taken for the page.
23 *
24 * @return null
25 */
26 public function run() {
27 $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
28 $this->_context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this);
29
30 $this->assign('action', $this->_action);
31 $this->assign('context', $this->_context);
32
33 $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
34
35 $caseId = CRM_Utils_Request::retrieve('caseId', 'Positive', $this);
36
37 CRM_Case_Page_Tab::setContext($this);
38
39 $this->assign('caseID', $caseId);
40 $this->assign('contactID', $this->_contactId);
41 $this->assign('userID', CRM_Core_Session::singleton()->get('userID'));
42
43 return parent::run();
44 }
45
46 }