/**
  * Process the delete-import action.
  */
 public function deleteImportAction()
 {
     $process = $this->_helper->db->getTable('Process')->find($this->_getParam('processId'));
     $process = Omeka_Job_Process_Dispatcher::startProcess(self::PROCESS_CLASS_DELETE_IMPORT, null, array('processId' => $process->id));
     $this->_helper->flashMessenger('Deleting the import. This may take a while', 'success');
     $this->_helper->redirector->goto('index');
 }
 public function generateNgramsAction()
 {
     $request = $this->getRequest();
     if ($request->isPost()) {
         $corpus = $this->_helper->db->findById();
         Omeka_Job_Process_Dispatcher::startProcess('Process_GenerateNgrams', null, array('corpus_id' => $corpus->id, 'n' => $request->getPost('n')));
         $this->_helper->flashMessenger('The corpus ngrams are now being generated. This may take some time.', 'success');
         $this->_helper->redirector->gotoRoute(array('action' => 'show', 'id' => $corpus->id), 'ngramId');
     }
     $this->_helper->redirector('browse');
 }