PHP Класс MorePagerModule, vanilla

Наследование: extends Gdn_Module
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$ClientID The id applied to the div tag that contains the pager.
$CssClass The name of the stylesheet class to be applied to the pager. Default is 'Pager'.
$LessCode Translation code to be used for "less" link.
$Limit number of records being displayed on a single page of data. Default is 30.
$MoreCode Translation code to be used for "more" link.
$Offset The first record of the current page (the dataset offset).
$PagerEmpty If there are no pages to page through, this string will be returned in place of the pager. Default is an empty string.
$TotalRecords total number of records in the dataset.
$Url The string to contain the record offset. ie. /controller/action/%s/
$Wrapper The xhtml code that should wrap around the pager link. ie. '
%2$s
'; where %1$s represents id and class attributes (if defined by $this->ClientID and $this->CssClass) and %2$s represents the pager link.

Открытые методы

Метод Описание
__construct ( string $Sender = '' )
assetTarget ( ) : boolean
configure ( $Offset, $Limit, $TotalRecords, $Url, $ForceConfigure = false ) Define all required parameters to create the Pager and PagerDetails.
details ( string $formatString = '' ) : string Builds a string with information about the page list's current position (ie. "1 to 15 of 56").
firstPage ( ) : boolean Whether or not this is the first page of the pager.
formatUrl ( $Url, $Offset, string $Limit = '' ) : mixed | string
hasMorePages ( ) Are there more pages after the current one?
lastPage ( ) : boolean Whether or not this is the last page of the pager.
toString ( $Type = 'more' ) Returns the "show x more (or less) items" link.

Описание методов

__construct() публичный Метод

public __construct ( string $Sender = '' )
$Sender string

assetTarget() публичный Метод

public assetTarget ( ) : boolean
Результат boolean

configure() публичный Метод

Define all required parameters to create the Pager and PagerDetails.
public configure ( $Offset, $Limit, $TotalRecords, $Url, $ForceConfigure = false )

details() публичный Метод

Builds a string with information about the page list's current position (ie. "1 to 15 of 56").
public details ( string $formatString = '' ) : string
$formatString string Not used.
Результат string Built string.

firstPage() публичный Метод

Whether or not this is the first page of the pager.
public firstPage ( ) : boolean
Результат boolean True if this is the first page.

formatUrl() публичный статический Метод

public static formatUrl ( $Url, $Offset, string $Limit = '' ) : mixed | string
$Url
$Offset
$Limit string
Результат mixed | string

hasMorePages() публичный Метод

Are there more pages after the current one?
public hasMorePages ( )

lastPage() публичный Метод

Whether or not this is the last page of the pager.
public lastPage ( ) : boolean
Результат boolean True if this is the last page.

toString() публичный Метод

Returns the "show x more (or less) items" link.
public toString ( $Type = 'more' )

Описание свойств

$ClientID публичное свойство

The id applied to the div tag that contains the pager.
public $ClientID

$CssClass публичное свойство

The name of the stylesheet class to be applied to the pager. Default is 'Pager'.
public $CssClass

$LessCode публичное свойство

Translation code to be used for "less" link.
public $LessCode

$Limit публичное свойство

number of records being displayed on a single page of data. Default is 30.
public $Limit

$MoreCode публичное свойство

Translation code to be used for "more" link.
public $MoreCode

$Offset публичное свойство

The first record of the current page (the dataset offset).
public $Offset

$PagerEmpty публичное свойство

If there are no pages to page through, this string will be returned in place of the pager. Default is an empty string.
public $PagerEmpty

$TotalRecords публичное свойство

total number of records in the dataset.
public $TotalRecords

$Url публичное свойство

The string to contain the record offset. ie. /controller/action/%s/
public $Url

$Wrapper публичное свойство

The xhtml code that should wrap around the pager link. ie. '
%2$s
'; where %1$s represents id and class attributes (if defined by $this->ClientID and $this->CssClass) and %2$s represents the pager link.
public $Wrapper