XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
RMPageNav Class Reference

Public Member Functions

 __construct ($total_results, $items_page, $current_page, $steps=5)
 
 display ($caption=true, $showing=0)
 
 get_showing ()
 
 render ($caption, $showing=0)
 
 set_template ($path)
 
 start ()
 
 steps ()
 
 target_url ()
 

Private Attributes

 $current_page
 
 $displayed = false
 
 $items_page
 
 $rendered = ''
 
 $showing = ''
 
 $start = 0
 
 $steps = 5
 
 $template = ''
 
 $total_results
 
 $url = ''
 

Detailed Description

Definition at line 11 of file pagenav.php.

Constructor & Destructor Documentation

RMPageNav::__construct (   $total_results,
  $items_page,
  $current_page,
  $steps = 5 
)

Constructor

Parameters
intTotal results number
intItems per page
intCurrent Page
intSteps to show when number of pages exceed the specified number

Definition at line 32 of file pagenav.php.

References $current_page, $items_page, $steps, $total_results, RMTemplate\get(), and steps().

Here is the call graph for this function:

Member Function Documentation

RMPageNav::display (   $caption = true,
  $showing = 0 
)

Displays the navbar

Definition at line 163 of file pagenav.php.

References $showing, and render().

Here is the call graph for this function:

RMPageNav::get_showing ( )

Gets the text "Showing..."

Definition at line 77 of file pagenav.php.

References $showing.

RMPageNav::render (   $caption,
  $showing = 0 
)

This method render the navigation bar with pages and all information. Also creates the message "Shogin ..." that can be get after.

Parameters
boolINdicates if this method must show the navbar or only render it
Returns
string|echo

Definition at line 103 of file pagenav.php.

References $current_page, $items_page, $rendered, $showing, $start, $steps, $template, $total_results, $url, __(), RMTemplate\get(), start(), and steps().

Referenced by display().

Here is the call graph for this function:

Here is the caller graph for this function:

RMPageNav::set_template (   $path)

Set the template to use with render

Parameters
stringPath to template file

Definition at line 92 of file pagenav.php.

References $path.

RMPageNav::start ( )

Get start number

Definition at line 84 of file pagenav.php.

References $start.

Referenced by render().

Here is the caller graph for this function:

RMPageNav::steps ( )

Set or gets the step numbers

Parameters
intSteps number
Returns
int

Definition at line 64 of file pagenav.php.

References $steps.

Referenced by __construct(), and render().

Here is the caller graph for this function:

RMPageNav::target_url ( )

Set or gets the url for pages. URL must contain the string {PAGE_NUM} that will replaced for the page number (eg. /somepage.php?param=something&page={PAGE_NUM})

Parameters
stringTarget url
Returns
string

Definition at line 48 of file pagenav.php.

References $url.

Member Data Documentation

RMPageNav::$current_page
private

Definition at line 15 of file pagenav.php.

Referenced by __construct(), and render().

RMPageNav::$displayed = false
private

Definition at line 19 of file pagenav.php.

RMPageNav::$items_page
private

Definition at line 14 of file pagenav.php.

Referenced by __construct(), and render().

RMPageNav::$rendered = ''
private

Definition at line 20 of file pagenav.php.

Referenced by render().

RMPageNav::$showing = ''
private

Definition at line 18 of file pagenav.php.

Referenced by display(), get_showing(), and render().

RMPageNav::$start = 0
private

Definition at line 22 of file pagenav.php.

Referenced by render(), and start().

RMPageNav::$steps = 5
private

Definition at line 16 of file pagenav.php.

Referenced by __construct(), render(), and steps().

RMPageNav::$template = ''
private

Definition at line 21 of file pagenav.php.

Referenced by render().

RMPageNav::$total_results
private

Definition at line 13 of file pagenav.php.

Referenced by __construct(), and render().

RMPageNav::$url = ''
private

Definition at line 17 of file pagenav.php.

Referenced by render(), and target_url().


The documentation for this class was generated from the following file: