Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
HandlerValidator Class Reference

Inherited by HandlerValidatorCustom, and HandlerValidatorPolicy.

Public Member Functions

 HandlerValidator (&$handler, $redirectToLogin=false, $message=null, $additionalArgs=array())
 
 isValid ()
 

Public Attributes

 $additionalArgs
 
 $handler
 
 $message
 
 $redirectToLogin
 

Detailed Description

Class to represent a page validation check.

Class to represent a policy based validation check.

NB: Deprecated - please use ContextRequiredPolicy instead, see #5868.

NB: This class is deprecated and only exists for backward compatibility. Please use AuthorizationPolicy classes for authorization from now on.

NB: Deprecated - please use RoleBasedHandlerOperationPolicy instead.

Definition at line 15 of file HandlerValidator.inc.php.

Member Function Documentation

HandlerValidator::HandlerValidator ( $handler,
  $redirectToLogin = false,
  $message = null,
  $additionalArgs = array() 
)

Constructor.

Parameters
$handlerHandler the associated form
$messagestring the error message for validation failures (i18n key)

Definition at line 34 of file HandlerValidator.inc.php.

References $additionalArgs, $handler, $message, and $redirectToLogin.

HandlerValidator::isValid ( )

Check if field value is valid. Default check is that field is either optional or not empty.

Returns
boolean

Definition at line 51 of file HandlerValidator.inc.php.

Member Data Documentation

HandlerValidator::$additionalArgs

additional Args to pass in the URL

Definition at line 27 of file HandlerValidator.inc.php.

Referenced by HandlerValidator().

HandlerValidator::$handler

The Handler associated with the check

Definition at line 18 of file HandlerValidator.inc.php.

Referenced by HandlerValidator().

HandlerValidator::$message

message for login screen

Definition at line 24 of file HandlerValidator.inc.php.

Referenced by HandlerValidator().

HandlerValidator::$redirectToLogin

bool flag for redirecting

Definition at line 21 of file HandlerValidator.inc.php.

Referenced by HandlerValidator().


The documentation for this class was generated from the following file: