Piwik\Plugins\Dashboard\Controller::getAllDashboards PHP Метод

getAllDashboards() публичный Метод

Outputs all available dashboards for the current user as a JSON string
public getAllDashboards ( )
    public function getAllDashboards()
    {
        $this->checkTokenInUrl();
        if (Piwik::isUserIsAnonymous()) {
            Json::sendHeaderJSON();
            return '[]';
        }
        $login = Piwik::getCurrentUserLogin();
        $dashboards = $this->dashboard->getAllDashboards($login);
        Json::sendHeaderJSON();
        return json_encode($dashboards);
    }