/**
  */
 public function putAction()
 {
     $data = $this->_helper->requestData(true);
     // Try to load the chosen user
     $id = $this->getRequest()->getParam('id');
     $template = $this->_templateSrv->load($id);
     if (empty($template)) {
         throw new AppEx\NotFoundException('Template ' . $id . ' not found', 404);
     }
     // Check permissions
     $this->_helper->allowed('update', $template);
     // Filter data
     $data = $this->_helper->filter($data)->blacklist(array('id', 'type', 'organizationId'));
     // Modify the current details with the new data
     $template->importData($data);
     // Perform the update
     $this->_templateSrv->update($template);
     $this->view->data = $template->getId();
 }