/**
  * Deletes a tipos_vehiculo
  *
  * @param string $idtipos_vehiculo
  */
 public function deleteAction($idtipos_vehiculo)
 {
     $tipos_vehiculo = TiposVehiculo::findFirstByidtipos_vehiculo($idtipos_vehiculo);
     if (!$tipos_vehiculo) {
         $this->flash->error("tipos_vehiculo was not found");
         return $this->dispatcher->forward(array("controller" => "tipos_vehiculo", "action" => "index"));
     }
     if (!$tipos_vehiculo->delete()) {
         foreach ($tipos_vehiculo->getMessages() as $message) {
             $this->flash->error($message);
         }
         return $this->dispatcher->forward(array("controller" => "tipos_vehiculo", "action" => "search"));
     }
     $this->flash->success("tipos_vehiculo was deleted successfully");
     return $this->dispatcher->forward(array("controller" => "tipos_vehiculo", "action" => "index"));
 }