pager
extends helper
in
Pager view helper object
Table of Contents
$currentPage | Current page | int |
---|---|---|
$currentPageItemsCount | Numer of items on current page | int |
$itemsPerPage | Numer of items per page | int |
$maxItemCount | Maximum numer of items | int |
$maxPages | Caculated numer if pages | int |
$actionLink | Action data for pager | int |
$showNextButton | Show button to next page | int |
$showBackButton | Show button to previews page | int |
$data | Element data | array |
$id | Element ID | string |
$name | Element name | string |
$text | Input label | string |
$class | CSS class string | string |
$readonly | Element is readonly | bool |
$autoFocused | Element is autoFocused | bool |
$prefix | Element prefix | string |
$useWrapper | Add div wrapper to input field | string |
$wrapperClass | CSS class for div wrapper | string |
$labelClass | CS class for label | string |
$language | Language object | language |
$returned | Flag if element string was return by @see __toString | bool |
__construct() | Konstruktor | mixed |
getJsVars() | Returns optional JavaScript vars | array |
getJsLangVars() | Returns optional JavaScript language vars | array |
getString() | Return element string | string |
__construct() | Konstruktor | mixed |
setReturned() | Prevents rendering of view helper at the end of PHP proessing | $this |
getCleanName() | Name cleanup from bracket, etc. | string |
getNameIdString() | Returns name and ID string | string |
getIdString() | Returns name and ID string | string |
getDescriptionTextString() | Returns name and ID string | string |
initLabel() | Initialized default label by field name | bool |
setClass() | Set additional css class | $this |
getClassString() | Return class string | string |
getDataString() | Return class string | string |
getReadonlyString() | Return class string | string |
setReadonly() | Set element to readonly | $this |
setAutoFocused() | Make helper auto focused | $this |
getAutoFocusedString() | Return autofocused string | string |
setWrapper() | Use div wrapper around input field | $this |
setWrapperClass() | Set wrapper css class | $this |
setLabelClass() | Set label class CSS string | $this |
setText() | Set button description | $this |
getJsVars() | Returns optional JavaScript vars | void |
getJsLangVars() | Returns optional JavaScript language vars | void |
setData() | Add array for 'data-'-params to element | $this |
initFromYml() | bool | |
getString() | Return element string | string |
Properties
$currentPage
Current page
private
int
$currentPage
= 1
$currentPageItemsCount
Numer of items on current page
private
int
$currentPageItemsCount
= ""
$itemsPerPage
Numer of items per page
private
int
$itemsPerPage
= 50
$maxItemCount
Maximum numer of items
private
int
$maxItemCount
= ""
$maxPages
Caculated numer if pages
private
int
$maxPages
= ""
$actionLink
Action data for pager
private
int
$actionLink
= ''
$showNextButton
Show button to next page
private
int
$showNextButton
= false
$showBackButton
Show button to previews page
private
int
$showBackButton
= false
$data
Element data
protected
array
$data
= []
$id
Element ID
protected
string
$id
= ''
$name
Element name
protected
string
$name
= ''
$text
Input label
protected
string
$text
= ''
$class
CSS class string
protected
string
$class
= ''
$readonly
Element is readonly
protected
bool
$readonly
= false
$autoFocused
Element is autoFocused
protected
bool
$autoFocused
= false
$prefix
Element prefix
protected
string
$prefix
= ''
$useWrapper
Add div wrapper to input field
protected
string
$useWrapper
= false
$wrapperClass
CSS class for div wrapper
protected
string
$wrapperClass
= ''
$labelClass
CS class for label
protected
string
$labelClass
= ''
$language
Language object
protected
language
$language
$returned
Flag if element string was return by @see __toString
protected
bool
$returned
= false
Methods
__construct()
Konstruktor
public
__construct(
$actionLink :
string
, $currentPage :
int
, $currentPageItemsCount :
int
, $itemsPerPage :
int
, $maxItemCount :
int
)
: mixed
Parameters
- $actionLink : string
- $currentPage : int
- $currentPageItemsCount : int
- $itemsPerPage : int
- $maxItemCount : int
Return values
mixedgetJsVars()
Returns optional JavaScript vars
public
getJsVars(
)
: array
Tags
Return values
arraygetJsLangVars()
Returns optional JavaScript language vars
public
getJsLangVars(
)
: array
Tags
Return values
arraygetString()
Return element string
protected
getString(
)
: string
Tags
Return values
string__construct()
Konstruktor
public
__construct(
$name :
string
[, $id :
string
= '' ]
)
: mixed
Parameters
- $name : string
- $id : string = ''
Return values
mixedsetReturned()
Prevents rendering of view helper at the end of PHP proessing
public
setReturned(
$returned :
bool
)
: $this
Parameters
- $returned : bool
Return values
$thisgetCleanName()
Name cleanup from bracket, etc.
protected
final getCleanName(
)
: string
Return values
stringgetNameIdString()
Returns name and ID string
protected
getNameIdString(
)
: string
Return values
stringgetIdString()
Returns name and ID string
public
final getIdString(
)
: string
Return values
stringgetDescriptionTextString()
Returns name and ID string
protected
final getDescriptionTextString(
)
: string
Return values
stringinitLabel()
Initialized default label by field name
protected
final initLabel(
)
: bool
Tags
Return values
boolsetClass()
Set additional css class
public
setClass(
$class :
string
)
: $this
Parameters
- $class : string
Return values
$thisgetClassString()
Return class string
protected
getClassString(
)
: string
Return values
stringgetDataString()
Return class string
protected
getDataString(
)
: string
Return values
stringgetReadonlyString()
Return class string
protected
getReadonlyString(
)
: string
Return values
stringsetReadonly()
Set element to readonly
public
setReadonly(
$readonly :
bool
)
: $this
Parameters
- $readonly : bool
Return values
$thissetAutoFocused()
Make helper auto focused
public
setAutoFocused(
$autoFocused :
bool
)
: $this
Parameters
- $autoFocused : bool
Tags
Return values
$thisgetAutoFocusedString()
Return autofocused string
protected
getAutoFocusedString(
)
: string
Return values
stringsetWrapper()
Use div wrapper around input field
public
setWrapper(
$useWrapper :
bool
)
: $this
Parameters
- $useWrapper : bool
Return values
$thissetWrapperClass()
Set wrapper css class
public
setWrapperClass(
$wrapperClass :
string
)
: $this
Parameters
- $wrapperClass : string
Return values
$thissetLabelClass()
Set label class CSS string
public
setLabelClass(
$labelClass :
string
)
: $this
Parameters
- $labelClass : string
Tags
Return values
$thissetText()
Set button description
public
final setText(
$text :
string
[, $params :
array
= [] ]
)
: $this
Parameters
- $text : string
- $params : array = []
Return values
$thisgetJsVars()
Returns optional JavaScript vars
public
getJsVars(
)
: void
getJsLangVars()
Returns optional JavaScript language vars
public
getJsLangVars(
)
: void
setData()
Add array for 'data-'-params to element
public
setData(
$data :
array
)
: $this
Parameters
- $data : array
Return values
$thisinitFromYml()
public
final initFromYml(
$param :
array
, $viewVars :
array
)
: bool
Parameters
- $param : array
- $viewVars : array
Tags
Return values
boolgetString()
Return element string
protected
abstract getString(
)
: string