/** * Index action for migrate content * * @param array $formdata * @return void */ public function indexMigrateContentAction($formdata = NULL) { if ($this->sharedHelper->getTemplavoilaStaticDsIsEnabled()) { $tvtemplates = $this->migrateContentHelper->getAllFileTvTemplates(); } else { $tvtemplates = $this->migrateContentHelper->getAllDbTvTemplates(); } $beLayouts = $this->migrateContentHelper->getAllBeLayouts(); if (isset($formdata['tvtemplate'])) { $uidTvTemplate = intval($formdata['tvtemplate']); } else { $uidTvTemplate = current(array_keys($tvtemplates)); } if (isset($formdata['belayout'])) { $uidBeLayout = $formdata['belayout']; } else { $uidBeLayout = current(array_keys($beLayouts)); } if (!isset($formdata['flexformfieldprefix'])) { $formdata['flexformfieldprefix'] = 'tx_'; } if (!isset($formdata['convertflexformoption'])) { $formdata['convertflexformoption'] = 'merge'; } // Fetch content columns from TV and BE layouts depending on selection (first entry if empty) $tvContentCols = $this->sharedHelper->getTvContentCols($uidTvTemplate); $beContentCols = $this->sharedHelper->getBeLayoutContentCols($uidBeLayout); $this->view->assign('tvContentCols', $tvContentCols); $this->view->assign('beContentCols', $beContentCols); $this->view->assign('tvtemplates', $tvtemplates); $this->view->assign('belayouts', $beLayouts); $this->view->assign('formdata', $formdata); // Redirect to migrateContentAction when submit button pressed if (isset($formdata['startAction'])) { $this->redirect('migrateContent', NULL, NULL, array('formdata' => $formdata)); } }