Piwik\Plugins\Dashboard\Model::createNewDashboardForUser PHP Method

createNewDashboardForUser() public method

Creates a new dashboard for the current user User needs to be logged in
public createNewDashboardForUser ( $login, $name, $layout )
    public function createNewDashboardForUser($login, $name, $layout)
    {
        $nextId = $this->getNextIdDashboard($login);
        $query = sprintf('INSERT INTO %s (login, iddashboard, name, layout) VALUES (?, ?, ?, ?)', $this->table);
        $bind = array($login, $nextId, $name, $layout);
        Db::query($query, $bind);
        return $nextId;
    }