private function _paginationFromTemplate($totalItems, $currentPage, $perPage, tubepress_api_url_UrlInterface $url)
 {
     $url->removeSchemeAndAuthority();
     $url->getQuery()->set('tubepress_page', '___page-number___');
     $vars = array(tubepress_api_template_VariableNames::GALLERY_PAGINATION_CURRENT_PAGE_NUMBER => $currentPage, tubepress_api_template_VariableNames::GALLERY_PAGINATION_TOTAL_ITEMS => $totalItems, tubepress_api_template_VariableNames::GALLERY_PAGINATION_HREF_FORMAT => "{$url}", tubepress_api_template_VariableNames::GALLERY_PAGINATION_RESULTS_PER_PAGE => $perPage);
     return $this->_templating->renderTemplate('gallery/pagination', $vars);
 }
 public function __construct($name, $untranslatedDisplayName, tubepress_api_url_UrlFactoryInterface $urlFactory, $staticTemplateName = null)
 {
     parent::__construct($name, $untranslatedDisplayName, $staticTemplateName);
     $this->_url = $urlFactory->fromCurrent();
     $this->_url->removeSchemeAndAuthority();
 }