protected function PagerDefault::ensureElement
7.x pager.inc | protected PagerDefault::ensureElement() |
Ensure that there is an element associated with this query. If an element was not specified previously, then the value of the $maxElement counter is taken, after which the counter is incremented.
After running this method, access $this->element to get the element for this query.
1 call to PagerDefault::ensureElement()
- PagerDefault::execute in drupal-7.x/
includes/ pager.inc - Override the execute method.
File
- drupal-7.x/
includes/ pager.inc, line 90 - Functions to aid in presenting database results as a set of pages.
Class
- PagerDefault
- Query extender for pager queries.
Code
protected function ensureElement() {
if (!isset($this->element)) {
$this->element = self::$maxElement++;
}
}