You are here

public function InfiniteScroll::summaryTitle in Views Infinite Scroll 8

Return a string to display as the clickable title for the pager plugin.

Overrides PagerPluginBase::summaryTitle

File

src/Plugin/views/pager/InfiniteScroll.php, line 73

Class

InfiniteScroll
Views pager plugin to handle infinite scrolling.

Namespace

Drupal\views_infinite_scroll\Plugin\views\pager

Code

public function summaryTitle() {
  $action = $this->options['views_infinite_scroll']['automatically_load_content'] ? $this
    ->t('Automatic infinite scroll') : $this
    ->t('Click to load');
  $pages = $this->options['views_infinite_scroll']['initially_load_all_pages'] ? $this
    ->t('Initially load all pages') : $this
    ->t('Initially load one page');
  return $this
    ->formatPlural($this->options['items_per_page'], '@action, @count item', '@action, @count items, @pages', [
    '@action' => $action,
    '@count' => $this->options['items_per_page'],
    '@pages' => $pages,
  ]);
}