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 * Main page for Cases dashlet
24 class CRM_Dashlet_Page_MyCases
extends CRM_Core_Page
{
27 * List activities as dashlet.
31 public function run() {
32 $context = CRM_Utils_Request
::retrieve('context', 'Alphanumeric', $this, FALSE, 'dashlet');
33 $this->assign('context', $context);
35 //check for civicase access.
36 if (!CRM_Case_BAO_Case
::accessCiviCase()) {
37 CRM_Core_Error
::fatal(ts('You are not authorized to access this page.'));
40 $controller = new CRM_Core_Controller_Simple('CRM_Case_Form_Search',
41 ts('Case'), CRM_Core_Action
::BROWSE
,
45 $controller->setEmbedded(TRUE);
46 $controller->process();
49 if (CRM_Case_BAO_Case
::getCases(FALSE, ['type' => 'any'], $context, TRUE)) {
50 $this->assign('casePresent', TRUE);