public function addToEditHistory($media, $providerReference, $width, $height)
    {
        $key = 'media_edit_history_' . $media->getId();
        $history = $this->session->get($key, null);

        if(!$history)
        {
            $history = array();
        }
        else
        {
            $history = unserialize($history);
        }

        $history[] = array(
            'providerReference' => $providerReference,
            'width' => $width,
            'height' => $height
        );

        $this->session->set($key, serialize( $history ));
    }