public function putAction($id, $key, Request $request)
    {
        $options = $request->request->all();

        if (empty($options)) {
            $this->getFormatOptionsManager()->delete($id, $key);
        } else {
            $this->getFormatOptionsManager()->save($id, $key, $options);
        }
        $this->get('doctrine.orm.entity_manager')->flush();

        $formatOptions = $this->getFormatOptionsManager()->get($id, $key);

        return $this->handleView($this->view($formatOptions));
    }