Dashboard_Model Class Reference

Represents a set of widgets. More...

Inheritance diagram for Dashboard_Model:
BaseDashboard_Model Object_Model BaseObject_Model

Public Member Functions

 export_array ()
 Return the dashboard as an array, with widgets included.
 import_array ($ary)
 Import an array to replace the current dashboard.
 set_layout ($layout)
 Sets layout and converts to a new layout.
 add_read_perm ($table, $key)
 get_read_perm ()
 set_read_perm (array $permissions=array())
 Overrides previous read permissions.
 get_can_write ()
 Return if the current authenticated user can write to this dashboard.
 remove_read_perm ($table, $key)
 Discontinue sharing your dashboard with an object.

Detailed Description

Represents a set of widgets.

The TAC can display one dashboard at a time. The user chooses which dashboard to display.


Member Function Documentation

Dashboard_Model::add_read_perm ( table,
key 
)
Parameters:
$table string, such as 'users' or 'usergroups'
$key string, such as 'a user name'
Dashboard_Model::export_array (  ) 

Return the dashboard as an array, with widgets included.

Returns:
array('dashboard' => ..., 'widgets' => ...);
Dashboard_Model::get_can_write (  ) 

Return if the current authenticated user can write to this dashboard.

For now, we are only allowed to edit our own dashboards

Ninja rule: orm depend[] username

Returns:
boolean
Dashboard_Model::get_read_perm (  ) 
Returns:
array ['table1' => ['key1', 'key2', ...], 'table2' => ['key1', 'key2', ...]]

Reimplemented from BaseDashboard_Model.

Dashboard_Model::import_array ( ary  ) 

Import an array to replace the current dashboard.

Returns:
Nothing.
Dashboard_Model::remove_read_perm ( table,
key 
)

Discontinue sharing your dashboard with an object.

Parameters:
$table string, such as 'users' or 'usergroups'
$key string, such as 'a user name'
Dashboard_Model::set_layout ( layout  ) 

Sets layout and converts to a new layout.

Parameters:
$layout string The new layout.

Reimplemented from BaseDashboard_Model.

Dashboard_Model::set_read_perm ( array $  permissions = array()  ) 

Overrides previous read permissions.

Parameters:
$permissions array => ['table1' => ['key1', 'key2', ...], 'table2' => ['key1', 'key2', ...]]

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1