PHP 클래스 Piwik\Plugins\Dashboard\Model

상속: implements Piwik\Db\FactoryCreated
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( )
createNewDashboardForUser ( $login, $name, $layout ) Creates a new dashboard for the current user User needs to be logged in
createOrUpdateDashboard ( $login, $idDashboard, $layout ) Saves the layout as default
deleteAllLayoutsForUser ( $userLogin )
deleteDashboardForUser ( $idDashboard, $login ) Removes the dashboard with the given id
getAllDashboardsForUser ( $login )
getLayoutForUser ( string $login, integer $idDashboard ) : boolean | string Returns the layout in the DB for the given user, or false if the layout has not been set yet.
install ( )
replaceDashboardWidgets ( $dashboardLayout, array $oldWidgets, array $newWidgets ) Replaces widgets on the given dashboard layout with other ones
uninstall ( )
updateDashboardName ( string $login, integer $idDashboard, string $name ) Updates the name of a dashboard
updateLayoutForUser ( string $login, integer $idDashboard, string $layout ) Records the layout in the DB for the given user.

보호된 메소드들

메소드 설명
layoutContainsWidget ( $dashboardLayout, $widgetId ) : boolean Checks if a given dashboard layout contains a given widget

비공개 메소드들

메소드 설명
getNextIdDashboard ( $login )

메소드 상세

__construct() 공개 메소드

public __construct ( )

createNewDashboardForUser() 공개 메소드

Creates a new dashboard for the current user User needs to be logged in
public createNewDashboardForUser ( $login, $name, $layout )

createOrUpdateDashboard() 공개 메소드

Saves the layout as default
public createOrUpdateDashboard ( $login, $idDashboard, $layout )

deleteAllLayoutsForUser() 공개 메소드

public deleteAllLayoutsForUser ( $userLogin )

deleteDashboardForUser() 공개 메소드

Removes the dashboard with the given id
public deleteDashboardForUser ( $idDashboard, $login )

getAllDashboardsForUser() 공개 메소드

public getAllDashboardsForUser ( $login )

getLayoutForUser() 공개 메소드

Parameters must be checked BEFORE this function call
public getLayoutForUser ( string $login, integer $idDashboard ) : boolean | string
$login string
$idDashboard integer
리턴 boolean | string

install() 공개 정적인 메소드

public static install ( )

layoutContainsWidget() 보호된 정적인 메소드

Checks if a given dashboard layout contains a given widget
protected static layoutContainsWidget ( $dashboardLayout, $widgetId ) : boolean
$dashboardLayout
$widgetId
리턴 boolean

replaceDashboardWidgets() 공개 정적인 메소드

It uses the given widget definitions to find the old and to create the new widgets Each widget is defined with an array containing the following information array ( 'module' => string 'action' => string 'params' => array() ) if $newWidget does not contain a widget definition at the current position, the old widget will simply be removed
public static replaceDashboardWidgets ( $dashboardLayout, array $oldWidgets, array $newWidgets )
$oldWidgets array array containing widget definitions
$newWidgets array array containing widget definitions

uninstall() 공개 정적인 메소드

public static uninstall ( )

updateDashboardName() 공개 메소드

Updates the name of a dashboard
public updateDashboardName ( string $login, integer $idDashboard, string $name )
$login string
$idDashboard integer
$name string

updateLayoutForUser() 공개 메소드

Records the layout in the DB for the given user.
public updateLayoutForUser ( string $login, integer $idDashboard, string $layout )
$login string
$idDashboard integer
$layout string