.

WidgetFilterText Class Reference
[View]

A widget printing text filter. More...

Inheritance diagram for WidgetFilterText:
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_FILTERED = 2048

Detailed Description

A widget printing text filter.

Author:
Gerd Riesselmann

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


Constructor & Destructor Documentation

WidgetFilterText::__construct ( data  ) 

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

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

Member Function Documentation

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

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

00014                                                                  {
00015                 $w = new WidgetFilterText($data);
00016                 return $w->render($policy);
00017         }
WidgetFilterText::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 filtertext.widget.php.

00023                                                    {
00024                 $out = '';
00025                 foreach (Arr::force($this->data, false) as $item) {
00026                         $adapter = Arr::get_item($item, 'adapter', false);
00027                         if (empty($adapter)) {
00028                                 continue;
00029                         }
00030                         
00031                         $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'widgets/filtertext.meta');
00032                         $view->assign_array($item);
00033                         $view->assign('policy', $policy);                       
00034                         $view->render(); // No output!
00035                         
00036                         $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'widgets/filtertext');
00037                         $view->assign_array($item);
00038                         $view->assign('policy', $policy);                       
00039                         $out .= $view->render();
00040                 }
00041                 return $out;
00042         }

Member Data Documentation

WidgetFilterText::$data

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

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

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


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