src/Sulu/Bundle/MediaBundle/Controller/MediaFormatController.php
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));
    }
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));
    }
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 ) ) ; }
Edits a format resource.

@param int $id
@param string $key
@param Request $request

@return Response
Edits a format resource .