public function putAction($id, $key, Request $request)
{
$options = $request->get('options', []);
$locale = $this->getRequestParameter($request, 'locale', true);
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);
$format = $this->getFormatManager()->getFormatDefinition($key, $locale, $formatOptions);
return $this->handleView($this->view($format));
}