public function edit($name, $useDuration, $duration, $mute, $loop, $widgetId)
    {
        $this->name = $name;
        $this->useDuration = $useDuration;
        $this->duration = $duration;
        $this->mute = $mute;
        $this->loop = $loop;
        $this->widgetId = $widgetId;

        $this->getLogger()->info('Editing widget ID ' . $widgetId);
        $response = $this->doPut('/playlist/widget/' . $widgetId , $this->toArray());

        $this->getLogger()->debug('Passing the response to Hydrate');
        return $this->hydrate($response);
    }