Restrict pagination using entity field query I have pagination using entity field query:

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node');
$query-&gt;entityCondition('bundle', 'content_type');
$query-&gt;pager(3,0);
$result = $query-&gt;execute();
$pager=theme('pager');
print render ($pager);


and it is successfully displayed like below,



I need to restrict them to display to number 6 then ... like below:
1,2,3,4,5,6....next,last
It's very easy. Just use

$pager=theme('pager', array('quantity' =&gt; 6));