<?php

/*
 * @component UserPoints
 * @copyright Copyright (C) 2015-2022 Bernard Gilly - Adrien Roussel - Martin Brampton
 * @license : GNU/GPL
 * @Website : https://remository.com
 */

namespace BlackSheepResearch\Component\UserPoints\Site\Viewers;

// no direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Pagination\Pagination;

class UsersHTML extends UserView {

    function _display($tpl = null) {

        $document = Factory::getDocument();
        $this->action = Uri::getInstance()->toString();

        $this->pagination = new Pagination($this->total, $this->limitstart, $this->limit);

        // insert the page counter in the title of the window page
        $titlesuite = ( $this->limitstart ) ? ' - ' . $this->pagination->getPagesCounter() : '';
        $document->setTitle($document->getTitle() . $titlesuite);

        parent::display($tpl);
    }

}
