.

DashboardBase Class Reference
[Usermanagement]

Dashboard base class. More...

Inheritance diagram for DashboardBase:
IDashboard AdminDashboard DefaultDashboard DefaultDashboard EditorDashboard

List of all members.

Public Member Functions

  __construct ($user)
  get_content ($page_data)
  Create a view to render.
  get_description ()
  Returns description of dashboard.
  get_title ()
  Returns the title of the dashboard.
  get_user_menu_entries ()
  Return array of entries for user menu.

Protected Member Functions

  get_template_file_name ()
  Return template file name for dashboard.
  get_user ()
  Returns user.
  prepare_view ($view, $page_data)
  Allwos subclasses to prepare the view.

Protected Attributes

  $user = null

Detailed Description

Dashboard base class.

Author:
Gerd Riesselmann

Definition at line 8 of file dashboard.base.cls.php.


Constructor & Destructor Documentation

DashboardBase::__construct ( user  ) 

Definition at line 16 of file dashboard.base.cls.php.

00016                                            {
00017                 $this->user = $user;
00018         }

Member Function Documentation

DashboardBase::get_content ( page_data  ) 

Create a view to render.

Implements IDashboard.

Definition at line 46 of file dashboard.base.cls.php.

00046                                                 {
00047                 $view = ViewFactory::create_view(IViewFactory::MESSAGE, $this->get_template_file_name(), $page_data);
00048                 $this->prepare_view($view, $page_data);         
00049                 return trim($view->render());           
00050         }
DashboardBase::get_description (  ) 

Returns description of dashboard.

Implements IDashboard.

Definition at line 39 of file dashboard.base.cls.php.

00039                                           {
00040                 return '';
00041         }
DashboardBase::get_template_file_name (  )  [protected]

Return template file name for dashboard.

Returns:
string

Reimplemented in AdminDashboard, DefaultDashboard, EditorDashboard, and DefaultDashboard.

Definition at line 57 of file dashboard.base.cls.php.

00057                                                     {
00058                 throw new Exception('get_template_file_name() not implemented on ' . get_class($this));
00059         }
DashboardBase::get_title (  ) 

Returns the title of the dashboard.

Implements IDashboard.

Reimplemented in AdminDashboard, and EditorDashboard.

Definition at line 32 of file dashboard.base.cls.php.

00032                                     {
00033                 return tr('Your links', 'users');
00034         }
DashboardBase::get_user (  )  [protected]

Returns user.

Returns:
DAOUsers

Definition at line 25 of file dashboard.base.cls.php.

00025                                       {
00026                 return $this->user;
00027         }
DashboardBase::get_user_menu_entries (  ) 

Return array of entries for user menu.

Implements IDashboard.

Reimplemented in DefaultDashboard, and DefaultDashboard.

Definition at line 75 of file dashboard.base.cls.php.

00075                                                 {
00076                 return array();
00077         }
DashboardBase::prepare_view ( view,
page_data  
) [protected]

Allwos subclasses to prepare the view.

Parameters:
IView  $view
PageData  $page_data

Definition at line 67 of file dashboard.base.cls.php.

00067                                                            {
00068                 $view->assign('dashboard', $this);
00069                 $view->assign('user', $this->get_user());
00070         }

Member Data Documentation

DashboardBase::$user = null [protected]

Definition at line 14 of file dashboard.base.cls.php.


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