You are here

public function ShowMore::summaryTitle in Views Show More 8

Summary title overwrite.

Overrides PagerPluginBase::summaryTitle

File

src/Plugin/views/pager/ShowMore.php, line 26

Class

ShowMore
The plugin to handle show more pager.

Namespace

Drupal\views_show_more\Plugin\views\pager

Code

public function summaryTitle() {
  $initial = !empty($this->options['initial']) ? $this->options['initial'] : $this->options['items_per_page'];
  $offset = '';
  if (!empty($this->options['offset'])) {
    $offset = ', skip ' . $this->options['offset'];
  }
  return $this
    ->formatPlural($initial, 'Initial @initial item, ', 'Initial @initial items, ', [
    '@initial' => $initial,
  ]) . $this
    ->formatPlural($this->options['items_per_page'], 'Per click @count item', 'Per click @count items', [
    '@count' => $this->options['items_per_page'],
  ]) . $offset;
}