getMoreUrl 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,
      ];
    }
  }

  /** * Get the more URL for this view. * * Uses the custom URL if there is one, otherwise the display path. * * @return \Drupal\Core\Url * The more link as Url object. */
Home | Imprint | This part of the site doesn't use cookies.