function 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.
2 calls to PagerDefault::ensureElement()
- PagerDefault::execute in includes/
pager.inc - Override the execute method.
- PagerDefault::getElement in includes/
pager.inc - Gets the element ID for this pager query.
File
-
includes/
pager.inc, line 90
Class
- PagerDefault
- Query extender for pager queries.
Code
protected function ensureElement() {
if (!isset($this->element)) {
$this->element = self::$maxElement++;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.