PHP Class WidgetManager

ファイルを表示 Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
AddWidget ( integer $widgetId, $context, integer $uid = NULL, integer $order = NULL ) : boolean Add widget to user dashboard
ExtPath ( )
GetAvailable ( integer | null $uid = NULL ) : array Get available widgets for user
GetWidgetsByContext ( IWidgetContext $context ) : array Get widgets by context.
SetDefaultWidgets ( integer $p_uid ) : void Set default widgets for g_user
SetDefaultWidgetsAll ( ) : void Set default widgets for all existing users (called after install/upgrade)

Method Details

AddWidget() public static method

Add widget to user dashboard
public static AddWidget ( integer $widgetId, $context, integer $uid = NULL, integer $order = NULL ) : boolean
$widgetId integer
$uid integer
$order integer
return boolean

ExtPath() public static method

public static ExtPath ( )

GetAvailable() public static method

Get available widgets for user
public static GetAvailable ( integer | null $uid = NULL ) : array
$uid integer | null
return array of IWidget

GetWidgetsByContext() public static method

Get widgets by context.
public static GetWidgetsByContext ( IWidgetContext $context ) : array
$context IWidgetContext
return array of IWidget

SetDefaultWidgets() public static method

Set default widgets for g_user
public static SetDefaultWidgets ( integer $p_uid ) : void
$p_uid integer
return void

SetDefaultWidgetsAll() public static method

Set default widgets for all existing users (called after install/upgrade)
public static SetDefaultWidgetsAll ( ) : void
return void