original_string: public function saveAction(Request $request)
      {
          $repository = $this->get('phlexible_media_template.template_manager');
  
          $templateKey = $request->get('template_key');
          $params = $request->request->all();
  
          unset($params['template_key'],
          $params['module'],
          $params['controller'],
          $params['action']);
  
          $template = $repository->find($templateKey);
  
          $params = $this->fixParams($params);
  
          foreach ($params as $key => $value) {
              $template->setParameter($key, $value);
          }
  
          $repository->updateTemplate($template);
  
          return new ResultResponse(true, 'Media template "'.$template->getKey().'" saved.');
      }
code: public function saveAction(Request $request)
      {
          $repository = $this->get('phlexible_media_template.template_manager');
  
          $templateKey = $request->get('template_key');
          $params = $request->request->all();
  
          unset($params['template_key'],
          $params['module'],
          $params['controller'],
          $params['action']);
  
          $template = $repository->find($templateKey);
  
          $params = $this->fixParams($params);
  
          foreach ($params as $key => $value) {
              $template->setParameter($key, $value);
          }
  
          $repository->updateTemplate($template);
  
          return new ResultResponse(true, 'Media template "'.$template->getKey().'" saved.');
      }
code_tokens: public function saveAction ( Request $ request ) { $ repository = $ this -> get ( 'phlexible_media_template.template_manager' ) ; $ templateKey = $ request -> get ( 'template_key' ) ; $ params = $ request -> request -> all ( ) ; unset ( $ params [ 'template_key' ] , $ params [ 'module' ] , $ params [ 'controller' ] , $ params [ 'action' ] ) ; $ template = $ repository -> find ( $ templateKey ) ; $ params = $ this -> fixParams ( $ params ) ; foreach ( $ params as $ key => $ value ) { $ template -> setParameter ( $ key , $ value ) ; } $ repository -> updateTemplate ( $ template ) ; return new ResultResponse ( true , 'Media template "' . $ template -> getKey ( ) . '" saved.' ) ; }
docstring: Save variables.
  
  @param Request $request
  
  @return ResultResponse
  @Route("/save", name="mediatemplates_form_save")
docstring_tokens: Save variables .