Major style/template overhaul
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / template / plugin / SmallpagesFunctionTemplatePlugin.class.php
CommitLineData
11ade432
AE
1<?php
2namespace wcf\system\template\plugin;
11ade432 3use wcf\system\template\TemplateEngine;
11ade432
AE
4
5/**
a17de04e 6 * Template function plugin which generates simple sliding pagers.
11ade432
AE
7 *
8 * Usage:
a17de04e
MS
9 * {smallpages pages=10 link='page-%d.html'}
10 *
11 * assign to variable 'output'; do not print:
12 * {smallpages pages=10 link='page-%d.html' assign='output'}
13 *
14 * assign to variable 'output' and do print also:
15 * {smallpages pages=10 link='page-%d.html' assign='output' print=true}
11ade432 16 *
9f959ced 17 * @author Marcel Werk
2b6cb5c2 18 * @copyright 2001-2015 WoltLab GmbH
11ade432
AE
19 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
20 * @package com.woltlab.wcf
21 * @subpackage system.template.plugin
9f959ced 22 * @category Community Framework
11ade432 23 */
5d3ebeff
AE
24class SmallpagesFunctionTemplatePlugin extends PagesFunctionTemplatePlugin {
25 /**
0ad90fc3 26 * @see \wcf\system\template\plugin\PagesFunctionTemplatePlugin::SHOW_LINKS
5d3ebeff
AE
27 */
28 const SHOW_LINKS = 7;
11ade432 29
b8eab696
AE
30 /**
31 * @see \wcf\system\template\plugin\PagesFunctionTemplatePlugin::$cssClassName
32 */
33 protected $cssClassName = 'pageNavigation small';
34
11ade432 35 /**
0ad90fc3 36 * @see \wcf\system\template\plugin\PagesFunctionTemplatePlugin::makePreviousLink()
11ade432 37 */
5d3ebeff
AE
38 protected function makePreviousLink($link, $pageNo) {
39 return '';
11ade432
AE
40 }
41
42 /**
0ad90fc3 43 * @see \wcf\system\template\plugin\PagesFunctionTemplatePlugin::makeNextLink()
11ade432 44 */
5d3ebeff
AE
45 protected function makeNextLink($link, $pageNo, $pages) {
46 return '';
11ade432
AE
47 }
48
49 /**
0ad90fc3 50 * @see \wcf\system\template\IFunctionTemplatePlugin::execute()
11ade432
AE
51 */
52 public function execute($tagArgs, TemplateEngine $tplObj) {
5d3ebeff 53 $tagArgs['page'] = 0;
11ade432 54
5d3ebeff 55 return parent::execute($tagArgs, $tplObj);
11ade432
AE
56 }
57}