/** * Delete the instance of the Report. * * @param int $id * * @return mixed * $results no of deleted Instance on success, false otherwise */ public static function del($id = NULL) { $dao = new CRM_Report_DAO_ReportInstance(); $dao->id = $id; return $dao->delete(); }
private function deleteReports() { // disable logging templates CRM_Core_DAO::executeQuery("\n UPDATE civicrm_option_value\n SET is_active = 0\n WHERE value IN ('" . implode("', '", $this->reports) . "')\n "); // delete report instances $domain_id = CRM_Core_Config::domainID(); foreach ($this->reports as $report) { $dao = new CRM_Report_DAO_ReportInstance(); $dao->domain_id = $domain_id; $dao->report_id = $report; $dao->delete(); } }
/** * Delete the instance of the Report. * * @param int $id * * @return mixed * $results no of deleted Instance on success, false otherwise */ public static function del($id = NULL) { $navId = CRM_Core_DAO::getFieldValue('CRM_Report_DAO_ReportInstance', $id, 'navigation_id', 'id'); $dao = new CRM_Report_DAO_ReportInstance(); $dao->id = $id; $result = $dao->delete(); // Delete navigation if exists. if ($navId) { CRM_Core_BAO_Navigation::processDelete($navId); CRM_Core_BAO_Navigation::resetNavigation(); } return $result; }