Public Member Functions | Public Attributes

BeToolbarHelper Class Reference

Table toolbar for pagination and search helper. More...

Inheritance diagram for BeToolbarHelper:
AppHelper

List of all members.

Public Member Functions

 init (&$toolbar)
 initialize toolbar in params['toolbar']
 next ($title= ' > ', $options=array(), $disabledTitle= ' > ', $disabledOption=array())
 Return the link (html anchor tag) for the next page.
 prev ($title= '< ', $options=array(), $disabledTitle= '< ', $disabledOption=array())
 Return the link (html anchor tag) for the previous page.
 first ($title= '|< ', $options=array(), $disabledTitle= '|< ', $disabledOption=array())
 Return the link (html anchor tag) for the first page.
 last ($title= ' >| ', $options=array(), $disabledTitle= ' >| ', $disabledOption=array())
 Return the link (html anchor tag) for the last page.
 size ()
 Return number of records found.
 current ()
 Return current page.
 pages ()
 Return total number of pages.
 changeDim ($htmlAttributes=array(), $options=array(1, 5, 10, 20, 50, 100))
 View page size html select tag.
 changeDimSelect ($selectId, $htmlAttributes=array(), $options=array(1=> 1, 5=> 5, 10=> 10, 20=> 20, 50=> 50, 100=> 100))
 return dropdown list with changed dimension
 changePage ($htmlAttributes=array(), $items=5)
 Change selected page.
 changePageSelect ($selectId, $htmlAttributes=array(), $items=5)
 Change page in a dropdown list of results.
 order ($field, $title="", $image="", $htmlAttributes=array(), $dir=null)
 Change list order.
 getPassedArgs ($otherParams=array())
 get array arguments

Public Attributes

 $helpers = array('Form', 'Html')
 $tags

Detailed Description

Table toolbar for pagination and search helper.

Version:
$Revision$ $LastChangedBy$ $LastChangedDate$

$Id$

Definition at line 31 of file be_toolbar.php.


Member Function Documentation

BeToolbarHelper::changeDim ( htmlAttributes = array(),
options = array(1, 5, 10, 20, 50, 100) 
)

View page size html select tag.

Parameters:
array $htmlAttributes associative Array with HTML attributes
array $options Array. Default: 1, 5, 10,20, 50, 100
Returns:
string

Definition at line 143 of file be_toolbar.php.

References getPassedArgs().

BeToolbarHelper::changeDimSelect ( selectId,
htmlAttributes = array(),
options = array(1 => 1, 5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100) 
)

return dropdown list with changed dimension

Parameters:
string $selectId
array $htmlAttributes
array $options
Returns:
string

Definition at line 168 of file be_toolbar.php.

References getPassedArgs().

BeToolbarHelper::changePage ( htmlAttributes = array(),
items = 5 
)

Change selected page.

Parameters:
array $htmlAttributes associative Array with HTML attributes
array $items number of available pages, before and after current. Default: 5
Returns:
string

Definition at line 191 of file be_toolbar.php.

References getPassedArgs().

BeToolbarHelper::changePageSelect ( selectId,
htmlAttributes = array(),
items = 5 
)

Change page in a dropdown list of results.

Parameters:
string $selectId
array $htmlAttributes
array $items
Returns:
string

Definition at line 228 of file be_toolbar.php.

References getPassedArgs().

BeToolbarHelper::current (  ) 

Return current page.

Returns:
mixed int|string

Definition at line 123 of file be_toolbar.php.

BeToolbarHelper::first (  ) 

Return the link (html anchor tag) for the first page.

Parameters:
string $title Label link
array $option HTML attributes for link
string $disabledTitle Label link disabled
array $disabledOption HTML attributes for link disabled (if present, insert a tag SPAN)
Returns:
string

Definition at line 91 of file be_toolbar.php.

BeToolbarHelper::getPassedArgs ( otherParams = array()  ) 

get array arguments

Parameters:
array $otherParams
Returns:
array

Definition at line 354 of file be_toolbar.php.

Referenced by changeDim(), changeDimSelect(), changePage(), changePageSelect(), and order().

BeToolbarHelper::init ( &$  toolbar  ) 

initialize toolbar in params['toolbar']

Parameters:
array $toolbar

Definition at line 49 of file be_toolbar.php.

BeToolbarHelper::last ( title = ',
| '  ,
options = array(),
disabledTitle = ',
| '  ,
disabledOption = array() 
)

Return the link (html anchor tag) for the last page.

Parameters:
string $title Label link
array $option HTML attributes for link
string $disabledTitle Label link disabled
array $disabledOption HTML attributes for link disabled (if present, insert a tag SPAN)
Returns:
string

Definition at line 105 of file be_toolbar.php.

BeToolbarHelper::next ( title = ',
,
options = array(),
disabledTitle = ',
,
disabledOption = array() 
)

Return the link (html anchor tag) for the next page.

Parameters:
string $title Label link
array $option HTML attributes for link
string $disabledTitle Label link disabled
array $disabledOption HTML attributes for link disabled (if present, insert a tag SPAN)
Returns:
string

Definition at line 63 of file be_toolbar.php.

BeToolbarHelper::order ( field,
title = "",
image = "",
htmlAttributes = array(),
dir = null 
)

Change list order.

Parameters:
string $field Field for the "order by"
string $title Title for the link. Default: field name
array $htmlAttributes associative Array with HTML attributes
boolean $dir Se presente impone la direzione. 1: ascending, 0: descending otherwise, !(<current value>="">)
Returns:
string

Definition at line 269 of file be_toolbar.php.

References getPassedArgs().

BeToolbarHelper::pages (  ) 

Return total number of pages.

Returns:
mixed int|string

Definition at line 132 of file be_toolbar.php.

BeToolbarHelper::prev (  ) 

Return the link (html anchor tag) for the previous page.

Parameters:
string $title Label link
array $option HTML attributes for link
string $disabledTitle Label link disabled
array $disabledOption HTML attributes for link disabled (if present, insert a tag SPAN)
Returns:
string

Definition at line 77 of file be_toolbar.php.

BeToolbarHelper::size (  ) 

Return number of records found.

Returns:
mixed int|string

Definition at line 114 of file be_toolbar.php.


Member Data Documentation

BeToolbarHelper::$tags
Initial value:
 array(
        'with_text' => '<span %s >%s</span>',
        'without_text' => '<span %s />'
    )

Definition at line 39 of file be_toolbar.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus