initData() public method

Initialize form data from current galley (if applicable).
public initData ( )
 /**
  * Edit a format
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editFormat($args, $request)
 {
     $submission = $this->getSubmission();
     $representationDao = Application::getRepresentationDAO();
     $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId());
     import('controllers.grid.articleGalleys.form.ArticleGalleyForm');
     $articleGalleyForm = new ArticleGalleyForm($request, $submission, $representation);
     $articleGalleyForm->initData();
     return new JSONMessage(true, $articleGalleyForm->fetch($request));
 }
 /**
  * An action to edit a submission galley
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function edit($args, $request)
 {
     $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
     $articleGalley = $this->getAuthorizedContextObject(ASSOC_TYPE_GALLEY);
     import('controllers.grid.articleGalleys.form.ArticleGalleyForm');
     $articleGalleyForm = new ArticleGalleyForm($request, $submission, $articleGalley);
     $articleGalleyForm->initData();
     return new JSONMessage(true, $articleGalleyForm->fetch($request));
 }
 /**
  * Edit a galley.
  * @param $args array ($articleId, $galleyId)
  */
 function editGalley($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $submissionLayoutHandler = new SubmissionLayoutHandler();
     $submissionLayoutHandler->validate($articleId);
     $submission =& $submissionLayoutHandler->submission;
     $this->setupTemplate(true, $articleId, 'editing');
     if ($this->layoutEditingEnabled($submission)) {
         import('classes.submission.form.ArticleGalleyForm');
         $submitForm = new ArticleGalleyForm($articleId, $galleyId);
         if ($submitForm->isLocaleResubmit()) {
             $submitForm->readInputData();
         } else {
             $submitForm->initData();
         }
         $submitForm->display();
     } else {
         // View galley only
         $galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
         $galley =& $galleyDao->getGalley($galleyId, $articleId);
         if (!isset($galley)) {
             Request::redirect(null, null, 'submission', $articleId);
         }
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign('articleId', $articleId);
         $templateMgr->assign_by_ref('galley', $galley);
         $templateMgr->display('submission/layout/galleyView.tpl');
     }
 }
 /**
  * Edit a galley.
  * @param $args array ($articleId, $galleyId)
  */
 function editGalley($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $this->validate($articleId, SECTION_EDITOR_ACCESS_EDIT);
     $submission =& $this->submission;
     $this->setupTemplate(true, $articleId, 'editing');
     import('classes.submission.form.ArticleGalleyForm');
     $submitForm = new ArticleGalleyForm($articleId, $galleyId);
     if ($submitForm->isLocaleResubmit()) {
         $submitForm->readInputData();
     } else {
         $submitForm->initData();
     }
     $submitForm->display();
 }
 /**
  * Edit a galley.
  * @param $args array ($articleId, $galleyId)
  * @param $request PKPRequest
  */
 function editGalley($args, $request)
 {
     $articleId = (int) array_shift($args);
     $galleyId = (int) array_shift($args);
     $this->validate($articleId, SECTION_EDITOR_ACCESS_EDIT);
     $galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
     $galley =& $galleyDao->getGalley($galleyId, $articleId);
     if (!$galley) {
         $request->redirect(null, null, 'submissionEditing', $articleId);
     }
     $this->setupTemplate(true, $articleId, 'editing');
     import('classes.submission.form.ArticleGalleyForm');
     $submitForm = new ArticleGalleyForm($articleId, $galleyId);
     if ($submitForm->isLocaleResubmit()) {
         $submitForm->readInputData();
     } else {
         $submitForm->initData();
     }
     $submitForm->display();
 }
 /**
  * Edit a galley
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editGalley($args, $request)
 {
     // Form handling
     import('controllers.grid.articleGalleys.form.ArticleGalleyForm');
     $galleyForm = new ArticleGalleyForm($request, $this->getSubmission(), $this->getGalley());
     $galleyForm->initData();
     return new JSONMessage(true, $galleyForm->fetch($request, $this->getRequestArgs()));
 }