Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Form
  • Html
  • Javascript
  • Pagination
  • Widget
  • WidgetClient

Class Pagination

Provides helper methods for dealing with HTML content

Html
Extended by Pagination
Package: minPHP\helpers\html
Located at helpers/pagination/pagination.php

Methods summary

public
# __construct( array $get = array(), array $format = array() )

Sets default settings

Sets default settings

Parameters

$get
array
$get The GET parameters for the current request
$format
array
$format Format settings to overwrite default settings with (optional)
private array
# mergeArrays( array $arr1, array $arr2 )

Extends one array using another to overwrite existing values. Recursively merges data.

Extends one array using another to overwrite existing values. Recursively merges data.

Parameters

$arr1
array
$arr1 The array (default) to be merged into
$arr2
array
$arr2 The array to merge into $arr1

Returns

array
The merged arrays
public
# setGet( array $get )

Set all GET parameters for this pagination instance

Set all GET parameters for this pagination instance

Parameters

$get
array
$get An array of GET parameters
public
# setEol( string $eol )

Sets the end of line character to use

Sets the end of line character to use

Parameters

$eol
string
$eol The end of line character to use
public
# setSettings( array $format )

Sets the format settings

Sets the format settings

Parameters

$format
array
$format The format settings to overwrite
public string
# build( )

Builds the content of the pagination and optionally outputs it.

Builds the content of the pagination and optionally outputs it.

Returns

string
The HTML for the pagination, void if output enabled
private integer
# currentPage( )

Finds the current page based on the current URI and/or query parameters

Finds the current page based on the current URI and/or query parameters

Returns

integer
The current page
private string
# createNavItem( array $nav_item, string $page )

Creates a page nav item

Creates a page nav item

Parameters

$nav_item
array
$nav_item Navigation settings for a specific nav link
$page
string
$page The page number or symbol

Returns

string
The HTML for the nav item, void if output enabled
private string
# openTag( array $tag )

Opens a new tag

Opens a new tag

Parameters

$tag
array
$tag The tag setting to open

Returns

string
The HTML for an open tag, void if output enabled
private string
# closeTag( string $tag )

Closes a tag

Closes a tag

Parameters

$tag
string
$tag The tag setting to close

Returns

string
The HTML for a closing tag, void if output enabled
private string
# createLink( array $link, integer $page )

Creates a new link

Creates a new link

Parameters

$link
array
$link The link settings
$page
integer
$page The page number

Returns

string
The HTML for the <a> tag, void if output enabled
private
# getUri( )
public string
# getPageUri( integer $page )

Create the URI for the current page number, replacing any labels as needed.

Create the URI for the current page number, replacing any labels as needed.

Parameters

$page
integer
$page The page number

Returns

string
The completed URI
public
# setOutput( boolean $return )

Set whether to return $output generated by these methods, or to echo it out instead

Set whether to return $output generated by these methods, or to echo it out instead

Parameters

$return
boolean
$return True to return output from these form methods, false to echo results instead
private string
# output( string $html )

Handles whether to output or return $html

Handles whether to output or return $html

Parameters

$html
string
$html The HTML to output/return

Returns

string
The HTML given, void if output enabled

Methods inherited from Html

_(), addCondition(), buildAttributes(), concat(), hyperlink(), ifSet(), isUtf8(), safe()

Magic methods summary

Properties summary

private string $eol
#

The string to use as the end of line character

The string to use as the end of line character

private boolean $return_output
#

Whether or not to return output from various pagination methods

Whether or not to return output from various pagination methods

private array $settings
#

Format settings

Format settings

private array $get
#

All get parameters for this request

All get parameters for this request

Properties inherited from Html

$xhtml

Blesta API documentation generated by ApiGen 2.8.0