.

WidgetAlphaPager Class Reference

Prints letter bar. More...

Inheritance diagram for WidgetAlphaPager:
IWidget IRenderer

List of all members.

Public Member Functions

  __construct ($base_url, $selected)
  render ($policy=self::NONE)

Static Public Member Functions

static  output ($policy=self::LINK_TO_SUBPAGES, $base_url= '', $selected= '')

Public Attributes

  $base_url = ''
  $selected = ''
const  INCLUDE_NUMERIC = 4096
const  LINK_TO_SUBPAGES = 256

Detailed Description

Prints letter bar.

Definition at line 5 of file alphapager.widget.php.


Constructor & Destructor Documentation

WidgetAlphaPager::__construct ( base_url,
selected  
)

Definition at line 17 of file alphapager.widget.php.

00017                                                           {
00018                 $this->selected = $selected;
00019                 $this->base_url = $base_url ? $base_url : Url::current()->build(Url::RELATIVE);
00020                 $this->base_url = rtrim($this->base_url, '/') . '/';
00021         }

Member Function Documentation

static WidgetAlphaPager::output ( policy = self::LINK_TO_SUBPAGES,
base_url = '',
selected = ''  
) [static]

Definition at line 12 of file alphapager.widget.php.

00012                                                                                                       {
00013                 $w = new WidgetAlphaPager($base_url, $selected);
00014                 return $w->render($policy);
00015         }
WidgetAlphaPager::render ( policy = self::NONE  ) 

Implements IRenderer.

Definition at line 23 of file alphapager.widget.php.

00023                                                    {
00024                 $letters = range('a', 'z');
00025                 if (Common::flag_is_set($policy, self::INCLUDE_NUMERIC)) {
00026                         array_unshift($letters, '0-9');
00027                 }
00028                 $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'widgets/alphapager');
00029                 $view->assign('letters', $letters);
00030                 $view->assign('base_url', $this->base_url);
00031                 $view->assign('selected', $this->selected);
00032                 $view->assign('policy', $policy);
00033                 return $view->render();
00034         }       

Member Data Documentation

WidgetAlphaPager::$base_url = ''

Definition at line 10 of file alphapager.widget.php.

WidgetAlphaPager::$selected = ''

Definition at line 9 of file alphapager.widget.php.

Definition at line 7 of file alphapager.widget.php.

Definition at line 6 of file alphapager.widget.php.


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