Open Journal Systems  3.3.0
ReviewerForm Class Reference
Inheritance diagram for ReviewerForm:
Form AdvancedSearchReviewerForm CreateReviewerForm EnrollExistingReviewerForm

Public Member Functions

 __construct ($submission, $reviewRound)
 
 _getMailTemplateKey ($context)
 
 _isValidReviewer ($context, $submission, $reviewRound, $reviewerId)
 
 execute (... $functionParams)
 
 fetch ($request, $template=null, $display=false)
 
 getAdvancedSearchAction ($request)
 
 getReviewerFormActions ()
 
 getReviewRound ()
 
 getSubmission ()
 
 getSubmissionId ()
 
 getUserRoles ()
 
 initData ()
 
 readInputData ()
 
 setReviewerFormAction ($action)
 
 setReviewRound ($reviewRound)
 
 setSubmission ($submission)
 
 setUserRoles ($userRoles)
 
- Public Member Functions inherited from Form
 __construct ($template=null, $callHooks=true, $requiredLocale=null, $supportedLocales=null)
 
 _decomposeArray ($name, $value, $stack)
 
 addCheck ($formValidator)
 
 addError ($field, $message)
 
 addErrorField ($field)
 
 addSupportedFormLocale ($supportedLocale)
 
 display ($request=null, $template=null)
 
 getData ($key)
 
 getDefaultFormLocale ()
 
 getErrorsArray ()
 
 getLocaleFieldNames ()
 
 getRequiredLocale ()
 
 getTemplate ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

 $_reviewerFormActions
 
 $_reviewRound
 
 $_submission
 
 $_userRoles
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Detailed Description

Base Form for adding a reviewer to a submission. N.B. Requires a subclass to implement the "reviewerId" to be added.

Definition at line 19 of file ReviewerForm.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ReviewerForm::__construct (   $submission,
  $reviewRound 
)

Constructor.

Parameters
$submissionSubmission
$reviewRoundReviewRound

Reimplemented in AdvancedSearchReviewerForm, CreateReviewerForm, and EnrollExistingReviewerForm.

Definition at line 37 of file ReviewerForm.inc.php.

References Form\addCheck(), setReviewRound(), and setSubmission().

Member Function Documentation

◆ _getMailTemplateKey()

ReviewerForm::_getMailTemplateKey (   $context)

Get the email template key depending on if reviewer one click access is enabled or not as well as on review round.

Parameters
$contextContext The user's current context.
Returns
int Email template key

Definition at line 478 of file ReviewerForm.inc.php.

References getReviewRound().

Referenced by fetch(), and initData().

◆ _isValidReviewer()

ReviewerForm::_isValidReviewer (   $context,
  $submission,
  $reviewRound,
  $reviewerId 
)

Check if a given user id is enrolled in reviewer user group.

Parameters
$contextContext
$submissionSubmission
$reviewRoundReviewRound
$reviewerIdint
Returns
boolean

Definition at line 460 of file ReviewerForm.inc.php.

References DAORegistry\getDAO().

Referenced by execute(), and initData().

◆ execute()

ReviewerForm::execute (   $functionParams)

◆ fetch()

ReviewerForm::fetch (   $request,
  $template = null,
  $display = false 
)

Returns a string of the rendered form

Parameters
$requestPKPRequest
$templatestring the template to be rendered, mandatory if no template has been specified on class instantiation.
$displayboolean
Returns
string the rendered form

Reimplemented from Form.

Reimplemented in CreateReviewerForm, AdvancedSearchReviewerForm, and EnrollExistingReviewerForm.

Definition at line 223 of file ReviewerForm.inc.php.

References _getMailTemplateKey(), PKPServices\get(), Application\getContextAssocType(), DAORegistry\getDAO(), PKPTemplateManager\getManager(), getReviewerFormActions(), getReviewRound(), getSubmission(), and Form\setData().

◆ getAdvancedSearchAction()

ReviewerForm::getAdvancedSearchAction (   $request)

Get the link action that fetchs the advanced search form content

Parameters
$requestRequest
Returns
LinkAction

Definition at line 433 of file ReviewerForm.inc.php.

References getReviewRound(), and getSubmissionId().

Referenced by EnrollExistingReviewerForm\fetch(), and CreateReviewerForm\fetch().

◆ getReviewerFormActions()

ReviewerForm::getReviewerFormActions ( )

Get all of the reviewer form actions

Returns
array

Definition at line 124 of file ReviewerForm.inc.php.

References $_reviewerFormActions.

Referenced by fetch().

◆ getReviewRound()

ReviewerForm::getReviewRound ( )

◆ getSubmission()

ReviewerForm::getSubmission ( )

Get the submission

Returns
Submission

Definition at line 68 of file ReviewerForm.inc.php.

References $_submission.

Referenced by execute(), AdvancedSearchReviewerForm\fetch(), fetch(), getSubmissionId(), and initData().

◆ getSubmissionId()

ReviewerForm::getSubmissionId ( )

Get the submission Id

Returns
int submissionId

Definition at line 59 of file ReviewerForm.inc.php.

References getSubmission().

Referenced by execute(), AdvancedSearchReviewerForm\fetch(), getAdvancedSearchAction(), and initData().

◆ getUserRoles()

ReviewerForm::getUserRoles ( )

Get current user roles.

Returns
$userRoles Array

Definition at line 116 of file ReviewerForm.inc.php.

References $_userRoles.

Referenced by AdvancedSearchReviewerForm\fetch().

◆ initData()

ReviewerForm::initData ( )

◆ readInputData()

ReviewerForm::readInputData ( )

Assign form data to user-submitted data.

See also
Form::readInputData()

Reimplemented from Form.

Reimplemented in CreateReviewerForm, EnrollExistingReviewerForm, and AdvancedSearchReviewerForm.

Definition at line 300 of file ReviewerForm.inc.php.

References Form\readUserVars().

◆ setReviewerFormAction()

ReviewerForm::setReviewerFormAction (   $action)

Set a reviewer form action

Parameters
$actionLinkAction

Definition at line 100 of file ReviewerForm.inc.php.

Referenced by EnrollExistingReviewerForm\fetch(), AdvancedSearchReviewerForm\fetch(), and CreateReviewerForm\fetch().

◆ setReviewRound()

ReviewerForm::setReviewRound (   $reviewRound)

Set the ReviewRound

Parameters
$reviewRoundReviewRound

Definition at line 92 of file ReviewerForm.inc.php.

Referenced by __construct().

◆ setSubmission()

ReviewerForm::setSubmission (   $submission)

Set the submission

Parameters
$submissionSubmission

Definition at line 84 of file ReviewerForm.inc.php.

Referenced by __construct().

◆ setUserRoles()

ReviewerForm::setUserRoles (   $userRoles)

Set current user roles.

Parameters
$userRolesArray

Definition at line 108 of file ReviewerForm.inc.php.

Field Documentation

◆ $_reviewerFormActions

ReviewerForm::$_reviewerFormActions

An array of actions for the other reviewer forms

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

Referenced by getReviewerFormActions().

◆ $_reviewRound

ReviewerForm::$_reviewRound

The review round associated with the review assignment

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

Referenced by getReviewRound().

◆ $_submission

ReviewerForm::$_submission

The submission associated with the review assignment

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

Referenced by getSubmission().

◆ $_userRoles

ReviewerForm::$_userRoles

An array with all current user roles

Definition at line 30 of file ReviewerForm.inc.php.

Referenced by getUserRoles().


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