/** * function to delete batch entry * * @param int $batchId batch id * * @return void * @access public */ static function deleteBatch($batchId) { //delete batch entries from cache $cacheKeyString = CRM_Core_BAO_Batch::getCacheKeyForBatch($batchId); CRM_Core_BAO_Cache::deleteGroup('batch entry', $cacheKeyString, FALSE); // delete entry from batch table $batch = new CRM_Core_DAO_Batch(); $batch->id = $batchId; $batch->delete(); }
/** * returns the list of fields that can be exported * * @access public * return array * @static */ static function &export($prefix = false) { if (!self::$_export) { self::$_export = array(); $fields = self::fields(); foreach ($fields as $name => $field) { if (CRM_Utils_Array::value('export', $field)) { if ($prefix) { self::$_export['batch'] =& $fields[$name]; } else { self::$_export[$name] =& $fields[$name]; } } } } return self::$_export; }