.

WidgetSorter Class Reference
[View]

Prints sorting controls. More...

Inheritance diagram for WidgetSorter:
IWidget IRenderer

List of all members.

Public Member Functions

  __construct ($data)
  render ($policy=self::NONE)
  Renders what should be rendered.

Static Public Member Functions

static  output ($data, $policy=self::NONE)

Public Attributes

  $data
const  DONT_CHANGE_TITLE = 4096
const  DONT_INDEX_SORTED = 2048

Detailed Description

Prints sorting controls.

Author:
Gerd Riesselmann

Definition at line 8 of file sorter.widget.php.


Constructor & Destructor Documentation

WidgetSorter::__construct ( data  ) 

Definition at line 19 of file sorter.widget.php.

00019                                            {
00020                 $this->data = $data;
00021         }

Member Function Documentation

static WidgetSorter::output ( data,
policy = self::NONE  
) [static]

Definition at line 14 of file sorter.widget.php.

00014                                                                  {
00015                 $w = new WidgetSorter($data);
00016                 return $w->render($policy);
00017         }
WidgetSorter::render ( policy = self::NONE  ) 

Renders what should be rendered.

Parameters:
int  $policy Defines how to render, meaning depends on implementation
Returns:
string The rendered content

Implements IRenderer.

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

00023                                                    {
00024                 if (Arr::get_item($this->data, 'columns_total', 0) < 2) {
00025                         return '';
00026                 }
00027                 
00028                 $policy = $policy | ($this->data['policy'] * 2048); // Compatability
00029 
00030                 $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'widgets/sorter.meta');
00031                 $view->assign('sorter_data', $this->data);
00032                 $view->assign('page_data', $this->data['page_data']);
00033                 $view->assign('policy', $policy);
00034                 $view->render(); // this view should not return anything! 
00035                                 
00036                 $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'core::widgets/sorter');
00037                 $view->assign('sorter_data', $this->data);
00038                 $view->assign('page_data', $this->data['page_data']);
00039                 $view->assign('policy', $policy);
00040                 return $view->render();
00041         }

Member Data Documentation

WidgetSorter::$data

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

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

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


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