/**
  * Creates from the model a \Zend_Form using createForm and adds elements
  * using addFormElements().
  *
  * @param int $step The current step
  * @return \Zend_Form
  */
 protected function getFormFor($step)
 {
     $baseform = $this->createForm();
     if ($this->trackEngine && $step == 4 && \MUtil_Bootstrap::enabled() !== true && $baseform instanceof \MUtil_Form) {
         $model = $this->getModel();
         $table = new \MUtil_Html_DivFormElement();
         $table->setAsFormLayout($baseform);
         $baseform->setAttrib('class', $this->class);
         $bridge = $model->getBridgeFor('form', $baseform);
         $this->_items = null;
         $this->initItems();
         $this->addFormElementsFor($bridge, $model, $step);
         return $baseform;
     } else {
         return parent::getFormFor($step);
     }
 }
 /**
  * Set what to do when the form is 'finished'.
  *
  * @return \MUtil_Snippets_Standard_ModelImportSnippet
  */
 protected function setAfterSaveRoute()
 {
     if (isset($this->_session->localfile) && file_exists($this->_session->localfile)) {
         // Now is a good moment to remove the temporary file
         @unlink($this->_session->localfile);
     }
     parent::setAfterSaveRoute();
 }