public function edit($name, $duration, $useDuration, $themeId, $clockTypeId, $offset, $format, $showSeconds, $clockFace, $widgetId)
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->name = $name;
        $this->duration = $duration;
        $this->useDuration = $useDuration;
        $this->themeId = $themeId;
        $this->clockTypeId = $clockTypeId;
        $this->offset = $offset;
        $this->format = $format;
        $this->showSeconds = $showSeconds;
        $this->clockFace = $clockFace;
        $this->widgetId = $widgetId;
        $this->getLogger()->info('Editing widget ID ' . $widgetId);
        $response = $this->doPut('/playlist/widget/' . $widgetId , $this->toArray());

        return $this->hydrate($response);
    }