/** * Get the custom URL of the Tracking Code * * @return string URL */ protected function getCustomUrl() { $path = $this->request->getUri()->getPath(); $routeMatch = $this->router->match($this->request); if ($routeMatch && $routeMatch->getMatchedRouteName() == 'vufindrecord-ajaxtab') { // Replace 'AjaxTab' with tab name in record page URLs $replace = 'AjaxTab'; $tab = $this->request->getPost('tab'); if (null !== ($pos = strrpos($path, $replace))) { $path = substr_replace($path, $tab, $pos, $pos + strlen($replace)); } } return $path; }
public function indexAction() { if ($this->getRequest()->isPost()) { $request = new Zend\Http\PhpEnvironment\Request(); $formData = array_merge_recursive($request->getPost()->toArray(), $request->getFiles()->toArray()); $this->formRegistration->setData($formData); if ($this->formRegistration->isValid($formData)) { $users = $this->model; $users->setRenderer($this->view); $users->userAdd($this->formRegistration); $this->_helper->FlashMessenger('Registration complete'); $this->getHelper('Redirector')->gotoRouteAndExit(array('module' => 'user', 'controller' => 'auth', 'action' => 'index'), 'userLogin'); } } $this->view->title = "User registration Page"; $this->view->registrationLink = " active"; $this->view->form = $this->formRegistration; $this->view->status = $this->_helper->flashMessenger->getMessages(); }