copyValues($params); $entityBatch->save(); CRM_Utils_Hook::post($op, 'EntityBatch', $entityBatch->id, $entityBatch); return $entityBatch; } /** * Remove entries from entity batch. * @param array|int $params * @return CRM_Batch_DAO_EntityBatch */ public static function del($params) { if (!is_array($params)) { $params = array('id' => $params); } $entityBatch = new CRM_Batch_DAO_EntityBatch(); $entityId = CRM_Utils_Array::value('id', $params); CRM_Utils_Hook::pre('delete', 'EntityBatch', $entityId, $params); $entityBatch->copyValues($params); $entityBatch->delete(); CRM_Utils_Hook::post('delete', 'EntityBatch', $entityBatch->id, $entityBatch); return $entityBatch; } }