public function edit($name, $duration, $useDuration, $dataSetColumnId = [], $updateInterval, $rowsPerPage, $showHeadings, $upperLimit = 0, $lowerLimit = 0, $filter = null, $ordering = null, $templateId = 'empty', $overrideTemplate = 0, $useOrderingClause = 0, $useFilteringClause = 0, $noDataMessage = '', $widgetId)
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->name = $name;
        $this->duration = $duration;
        $this->useDuration = $useDuration;
        $this->dataSetColumnId = $dataSetColumnId;
        $this->updateInterval = $updateInterval;
        $this->rowsPerPage = $rowsPerPage;
        $this->showHeadings = $showHeadings;
        $this->upperLimit = $upperLimit;
        $this->lowerLimit = $lowerLimit;
        $this->filter = $filter;
        $this->ordering = $ordering;
        $this->templateId = $templateId;
        $this->overrideTemplate = $overrideTemplate;
        $this->useOrderingClause = $useOrderingClause;
        $this->useFilteringClause = $useFilteringClause;
        $this->noDataMessage = $noDataMessage;
        $this->widgetId = $widgetId;
        $this->getLogger()->info('Editing widget ID ' . $widgetId);
        $response = $this->doPut('/playlist/widget/' . $widgetId, $this->toArray());

        return $this->hydrate($response);

    }