public static function find_by_params($params) { $event_in_cart = new CRM_Event_Cart_BAO_EventInCart(); $event_in_cart->copyValues($params); if ($event_in_cart->find(TRUE)) { return $event_in_cart; } else { return FALSE; } }