/**
  * Edit a format
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editFormatTab($args, $request)
 {
     $submission = $this->getSubmission();
     $representationDao = Application::getRepresentationDAO();
     $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId());
     import('controllers.grid.catalogEntry.form.PublicationFormatForm');
     $publicationFormatForm = new PublicationFormatForm($submission, $representation);
     $publicationFormatForm->initData();
     return new JSONMessage(true, $publicationFormatForm->fetch($request));
 }
 /**
  * Edit a format
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editFormat($args, $request)
 {
     // Identify the format to be updated
     $representationId = (int) $request->getUserVar('representationId');
     $submission = $this->getSubmission();
     $publicationFormatDao = DAORegistry::getDAO('PublicationFormatDAO');
     $publicationFormat = $publicationFormatDao->getById($representationId);
     // Form handling
     import('controllers.grid.catalogEntry.form.PublicationFormatForm');
     $publicationFormatForm = new PublicationFormatForm($submission, $publicationFormat);
     $publicationFormatForm->initData();
     return new JSONMessage(true, $publicationFormatForm->fetch($request));
 }