public function PrevNextHelper::getNextId in Previous/Next API 8.2
Callable API function to retun the next id of a given entity id.
Parameters
int $entity_id: Entity id.
Return value
int|null Entity id if found.
Overrides PrevNextHelperInterface::getNextId
1 call to PrevNextHelper::getNextId()
- PrevNextHelper::getPrevnextId in src/
PrevNextHelper.php - Callable API function to get the next/prev id of a given entity id.
File
- src/
PrevNextHelper.php, line 86
Class
- PrevNextHelper
- Defines an PrevNextHelper service.
Namespace
Drupal\prev_nextCode
public function getNextId($entity_id) {
return $this->database
->query("SELECT next_nid FROM {prev_next_node} WHERE nid = :nid", array(
':nid' => $entity_id,
))
->fetchField();
}