WidgetListItem Class Reference
[View]
A generic list's item. More...
Inheritance diagram for
WidgetListItem:
Public Member Functions |
|
__construct ($item) | |
render ($policy=self::NONE) | |
Renders what should be rendered. |
|
Static Public Member Functions |
|
static | output ($item, $policy=self::NONE) |
Protected Member Functions |
|
create_item_view ($model) | |
Protected Attributes |
|
$item | |
$page_data |
Detailed Description
A generic list's item.
Definition at line 8 of file listitem.widget.php.
Constructor & Destructor Documentation
WidgetListItem::__construct | ( | $ | item | ) |
Definition at line 17 of file listitem.widget.php.
00017 { 00018 $this->item = $item; 00019 }
Member Function Documentation
WidgetListItem::create_item_view | ( | $ | model | ) | [protected] |
Definition at line 33 of file listitem.widget.php.
00033 { 00034 $paths = array( 00035 $model . '/inc/listitem', 00036 'widgets/listitem' 00037 ); 00038 return ViewFactory::create_view(IViewFactory::MESSAGE, $paths); 00039 }
static WidgetListItem::output | ( | $ | item, | |
$ | policy =
self::NONE |
|||
) | [static] |
Definition at line 12 of file listitem.widget.php.
00012 { 00013 $widget = new WidgetListItem($item); 00014 return $widget->render($policy); 00015 }
WidgetListItem::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 21 of file listitem.widget.php.
00021 { 00022 $ret = ''; 00023 if ($this->item instanceof IDataObject) { 00024 $model = $this->item->get_table_name(); 00025 $view = $this->create_item_view($model); 00026 $view->assign('item', $this->item); 00027 $view->assign('policy', $policy); 00028 $ret = $view->render(); 00029 } 00030 return $ret; 00031 }
Member Data Documentation
WidgetListItem::$item
[protected] |
Definition at line 10 of file listitem.widget.php.
WidgetListItem::$page_data
[protected] |
Definition at line 9 of file listitem.widget.php.
The documentation for this class was generated from the following file:
- gyro/core/view/widgets/listitem.widget.php