display() public method

Display the form.
public display ( $request ) : PKPRequest
return PKPRequest
Exemplo n.º 1
0
 /**
  * Save user notification settings
  * @param $args array
  * @param $request Request
  */
 function saveSettings($args, &$request)
 {
     $this->validate();
     $this->setupTemplate(true);
     import('classes.notification.form.NotificationSettingsForm');
     $notificationSettingsForm = new NotificationSettingsForm();
     $notificationSettingsForm->readInputData();
     if ($notificationSettingsForm->validate()) {
         $notificationSettingsForm->execute($request);
         $router =& $request->getRouter();
         $request->redirectUrl($router->url($request, null, 'notification', 'settings'));
     } else {
         $notificationSettingsForm->display($request);
     }
 }
Exemplo n.º 2
0
 /**
  * Save user notification settings
  */
 function saveSettings()
 {
     $this->validate();
     $this->setupTemplate(true);
     import('notification.form.NotificationSettingsForm');
     $notificationSettingsForm = new NotificationSettingsForm();
     $notificationSettingsForm->readInputData();
     if ($notificationSettingsForm->validate()) {
         $notificationSettingsForm->execute();
         PKPRequest::redirect(NotificationHandler::getContextDepthArray(), 'notification', 'settings');
     } else {
         $notificationSettingsForm->display();
     }
 }