function PagerSelectExtender::ensureElement
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php \Drupal\Core\Database\Query\PagerSelectExtender::ensureElement()
- 8.9.x core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php \Drupal\Core\Database\Query\PagerSelectExtender::ensureElement()
- 11.x core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php \Drupal\Core\Database\Query\PagerSelectExtender::ensureElement()
Ensure that there is an element associated with this query.
After running this method, access $this->element to get the element for this query.
2 calls to PagerSelectExtender::ensureElement()
- PagerSelectExtender::execute in core/
lib/ Drupal/ Core/ Database/ Query/ PagerSelectExtender.php - Override the execute method.
- PagerSelectExtender::getElement in core/
lib/ Drupal/ Core/ Database/ Query/ PagerSelectExtender.php - Gets the element ID for this pager query.
File
-
core/
lib/ Drupal/ Core/ Database/ Query/ PagerSelectExtender.php, line 90
Class
- PagerSelectExtender
- Query extender for pager queries.
Namespace
Drupal\Core\Database\QueryCode
protected function ensureElement() {
if (!isset($this->element)) {
$this->element($this->connection
->getPagerManager()
->getMaxPagerElementId() + 1);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.