useMoreAlways example


  public function renderPager() {
    return TRUE;
  }

  /** * {@inheritdoc} */
  public function renderMoreLink() {
    $hasMoreRecords = !empty($this->view->pager) && $this->view->pager->hasMoreRecords();
    if ($this->isMoreEnabled() && ($this->useMoreAlways() || $hasMoreRecords)) {
      $url = $this->getMoreUrl();

      return [
        '#type' => 'more_link',
        '#url' => $url,
        '#title' => $this->useMoreText(),
        '#view' => $this->view,
      ];
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.