/**
  * Allows a user to delete a location type
  *
  */
 public function deleteAction()
 {
     $get = Zend_Registry::get('getFilter');
     if (!isset($get->typeId)) {
         throw new Ot_Exception_Input('msg-error-typeIdNotSet');
     }
     $locationType = new LocationType();
     $thisLocationType = $locationType->find($get->typeId);
     if (is_null($thisLocationType)) {
         throw new Ot_Exception_Data('msg-error-noLocationType');
     }
     $this->view->locationType = $thisLocationType;
     $form = Ot_Form_Template::delete('deleteForm');
     if ($this->_request->isPost() && $form->isValid($_POST)) {
         $where = $locationType->getAdapter()->quoteInto('typeId = ?', $get->typeId);
         $locationType->delete($where);
         $this->_helper->flashMessenger->addMessage('msg-info-locationTypeDeleted');
         $this->_helper->redirector->gotoUrl('/workshop/locationType/index');
     }
     $this->_helper->pageTitle('workshop-location-type-delete:title');
     $this->view->form = $form;
 }