You are here

private function NextPreviousBlock::generatePrevious in Next Previous Post Block (Node or Page Pagination) 8

Same name and namespace in other branches
  1. 8.5 src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::generatePrevious()
  2. 9.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::generatePrevious()
  3. 1.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::generatePrevious()

Lookup the previous node,youngest node which is still older than the node.

Parameters

string $current_nid: Show current page node id.

Return value

array A render array for a previous node.

1 call to NextPreviousBlock::generatePrevious()
NextPreviousBlock::build in src/Plugin/Block/NextPreviousBlock.php
Builds and returns the renderable array for this block plugin.

File

src/Plugin/Block/NextPreviousBlock.php, line 191

Class

NextPreviousBlock
Provides a 'Next Previous' block.

Namespace

Drupal\nextpre\Plugin\Block

Code

private function generatePrevious($current_nid) {
  return $this
    ->generateNextPrevious($current_nid, 'prev');
}