.

WidgetBookmarking Class Reference
[SocialBookmarking]

Prints social bookmarking list. More...

Inheritance diagram for WidgetBookmarking:
IWidget IRenderer

List of all members.

Public Member Functions

  __construct ($page_data, $set_or_array)
  render ($policy=self::NONE)
  Renders.

Static Public Member Functions

static  output ($page_data, $set_or_array, $policy=self::NONE)
  Output social bookmarking lsit.

Public Attributes

  $page_data
  $services

Detailed Description

Prints social bookmarking list.

Author:
Gerd Riesselmann

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


Constructor & Destructor Documentation

WidgetBookmarking::__construct ( page_data,
set_or_array  
)

Definition at line 33 of file bookmarking.widget.php.

00033                                                                {
00034                 $this->page_data = $page_data;
00035                 $this->services = is_array($set_or_array) ? $set_or_array : SocialBookmarking::create_set($set_or_array);
00036         }

Member Function Documentation

static WidgetBookmarking::output ( page_data,
set_or_array,
policy = self::NONE  
) [static]

Output social bookmarking lsit.

Parameters:
PageData  $page_data
string|array  $set_or_array Set name or array of services
int  $policy
Returns:
string

Definition at line 28 of file bookmarking.widget.php.

00028                                                                                      {
00029                 $w = new WidgetBookmarking($page_data, $set_or_array);
00030                 return $w->render($policy);
00031         }
WidgetBookmarking::render ( policy = self::NONE  ) 

Renders.

Parameters:
int  $policy
Returns:
string

Implements IRenderer.

Definition at line 44 of file bookmarking.widget.php.

00044                                                    {
00045                 $arr_services = array();
00046                 foreach($this->services as $service) {
00047                         $tmp = SocialBookmarking::get_service($service);
00048                         if ($tmp) {
00049                                 $arr_services[] = $tmp;
00050                         }               
00051                 }
00052                 
00053                 $this->page_data->head->add_css_file('css/socialbookmarking.css', true);
00054                 
00055                 $view = ViewFactory::create_view(IViewFactory::MESSAGE, 'widgets/bookmarking', false);
00056                 $view->assign('page_data', $this->page_data);
00057                 $view->assign('services', $arr_services);
00058                 return $view->render();
00059         }       

Member Data Documentation

WidgetBookmarking::$page_data

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

WidgetBookmarking::$services

Definition at line 18 of file bookmarking.widget.php.


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