@@ -65,12 +65,19 @@ user, create a listener.
6565 }
6666 );
6767
68- The ``QueryBuilder `` event has one function in addition to getters for
68+ Functions of the ``QueryBuilder `` event in addition to getters for
6969all resolve parameters:
7070
7171* ``getQueryBuilder `` - Will return a query builder with the user specified
7272 filters already applied.
73-
73+ * ``getOffset `` - Will return the offset for the query. The QueryBuilder passed
74+ to the event is not modified with the offset and limit yet. So if you have a
75+ large dataset and need to fetch it within the event, you may use this method
76+ to get the offset.
77+ * ``getLimit `` - Will return the limit for the query. The QueryBuilder passed
78+ to the event is not modified with the offset and limit yet. So if you have a
79+ large dataset and need to fetch it within the event, you may use this method
80+ to get the limit.
7481
7582Criteria Event
7683==============
@@ -148,6 +155,22 @@ all resolve parameters:
148155 if you need to fetch the collection to apply additional criteria.
149156* ``setCollection `` - Will set the collection object. This is useful if you
150157 need to filter the collection directly.
158+ * ``getOffset `` - Will return the projected offset for the collection. The collection passed
159+ to the event is not modified with the offset and limit yet. So if you have a
160+ large dataset and need to fetch it within the event, you may use this method
161+ to get the expected offset.
162+ * ``getLimit `` - Will return the projectd limit for the collection. The collection passed
163+ to the event is not modified with the offset and limit yet. So if you have a
164+ large dataset and need to fetch it within the event, you may use this method
165+ to get the expected limit.
166+
167+ .. note ::
168+
169+ The offset and limit is calculated before this event is fired and calculated
170+ again after the event. This is because the collection may be fetched and
171+ filtered before the limit is applied. The offset and limit are recalculated
172+ after the event is fired to ensure the correct data is returned.
173+
151174
152175Modify an Entity Definition
153176===========================
0 commit comments