PHP 클래스 PagerModule, vanilla

상속: extends Module
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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'.
$CurrentRecords The number of records in the current page.
$DefaultPageSize The default number of records per page.
$LessCode Translation code to be used for "less" link.
$Limit The number of records being displayed on a single page of data. Default is 30.
$MoreCode Translation code to be used for "Next Page" 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 The total number of records in the dataset.
$Url The string to contain the record offset. ie. /controller/action/%s/
$UrlCallBack string
$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.

보호된 프로퍼티들

프로퍼티 타입 설명
$_CurrentPager PagerModule
$_Totalled A boolean value indicating if the total number of records is known or not. Retrieving this number can be a costly database query, so sometimes it is not retrieved and simple "next/previous" links are displayed instead. Default is FALSE, meaning that the simple pager is displayed.

공개 메소드들

메소드 설명
__construct ( string $Sender = '' )
assetTarget ( ) : boolean
configure ( $Offset, $Limit, $TotalRecords, $Url, boolean $ForceConfigure = false ) Define all required parameters to create the Pager and PagerDetails.
controller ( ) : Gdn_Controller. Gets the controller this pager is for.
current ( null $Value = null ) : null | PagerModule
details ( string $FormatString = '' ) : boolean | 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, $Page, 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.
pageUrl ( $Page ) : mixed | string
rel ( $Page, $CurrentPage ) : null | string
toString ( string $Type = 'more' ) : string Builds page navigation links.
toStringPrevNext ( string $Type = 'more' ) : string
write ( array $Options = [] )

비공개 메소드들

메소드 설명
_GetCssClass ( $ThisPage, $HighlightPage ) : string

메소드 상세

__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, boolean $ForceConfigure = false )
$Offset
$Limit
$TotalRecords
$Url
$ForceConfigure boolean

controller() 공개 메소드

Gets the controller this pager is for.
public controller ( ) : Gdn_Controller.
리턴 Gdn_Controller.

current() 공개 정적인 메소드

public static current ( null $Value = null ) : null | PagerModule
$Value null
리턴 null | PagerModule

details() 공개 메소드

Builds a string with information about the page list's current position (ie. "1 to 15 of 56").
public details ( string $FormatString = '' ) : boolean | string
$FormatString string
리턴 boolean | 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, $Page, string $Limit = '' ) : mixed | string
$Url
$Page
$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.

pageUrl() 공개 메소드

public pageUrl ( $Page ) : mixed | string
$Page
리턴 mixed | string

rel() 공개 정적인 메소드

public static rel ( $Page, $CurrentPage ) : null | string
$Page
$CurrentPage
리턴 null | string

toString() 공개 메소드

Builds page navigation links.
public toString ( string $Type = 'more' ) : string
$Type string Type of link to return: 'more' or 'less'.
리턴 string HTML page navigation links.

toStringPrevNext() 공개 메소드

public toStringPrevNext ( string $Type = 'more' ) : string
$Type string
리턴 string

write() 공개 정적인 메소드

public static write ( array $Options = [] )
$Options array

프로퍼티 상세

$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

$CurrentRecords 공개적으로 프로퍼티

The number of records in the current page.
public $CurrentRecords

$DefaultPageSize 공개적으로 정적으로 프로퍼티

The default number of records per page.
public static $DefaultPageSize

$LessCode 공개적으로 프로퍼티

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

$Limit 공개적으로 프로퍼티

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

$MoreCode 공개적으로 프로퍼티

Translation code to be used for "Next Page" 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 공개적으로 프로퍼티

The total number of records in the dataset.
public $TotalRecords

$Url 공개적으로 프로퍼티

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

$UrlCallBack 공개적으로 프로퍼티

public string $UrlCallBack
리턴 string

$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

$_CurrentPager 보호되어 있는 정적으로 프로퍼티

protected static PagerModule $_CurrentPager
리턴 PagerModule

$_Totalled 보호되어 있는 프로퍼티

A boolean value indicating if the total number of records is known or not. Retrieving this number can be a costly database query, so sometimes it is not retrieved and simple "next/previous" links are displayed instead. Default is FALSE, meaning that the simple pager is displayed.
protected $_Totalled