assign('context', $context); //check for civicase access. if (!CRM_Case_BAO_Case::accessCiviCase()) { CRM_Core_Error::fatal(ts('You are not authorized to access this page.')); } $controller = new CRM_Core_Controller_Simple('CRM_Case_Form_Search', ts('Case'), CRM_Core_Action::BROWSE, NULL, FALSE, FALSE, TRUE ); $controller->setEmbedded(TRUE); $controller->process(); $controller->run(); if (CRM_Case_BAO_Case::getCases(TRUE, ['type' => 'any'], 'dashboard', TRUE)) { $this->assign('casePresent', TRUE); } return parent::run(); } }