For a select query I can add an extender and provide my custom Pager, but for an EntityFieldQuery, how do I do that ?
Should I extends the EntityFieldQuery and overrides the pager method ?
For a select query I can add an extender and provide my custom Pager, but for an EntityFieldQuery, how do I do that ?
Should I extends the EntityFieldQuery and overrides the pager method ?
Comments
Comment #1
sylvain lecoy commentedIf this is possible actually...
Comment #2
sylvain lecoy commentedGuys from irc couldn't find a solution either.. I think this can then be an interesting feature request for D7. What do you guys think ?
Comment #3
marcingy commentedFeatures go into d8 first.
Comment #4
feo commented+1, good proposition
Comment #5
krimos commentedTry this :
$result = db_select('entity_type','node')
->fields('field', array('id','value'))
->condition('uid', $account->uid)
->extend('PagerDefault')
->limit(5) // Default value is 10
->execute();
Comment #6
sylvain lecoy commentedYes that's the point krimos, it is doable for a select query, db_select returns a SelectQuery object. However, I would like to have the same behaviour for EntityFieldQuery, I don't know if that is possible.
Comment #7
sylvain lecoy commentedSeems it will be taken over by #1801726: EntityFieldQuery v2.