Open Journal Systems  3.3.0
PKPStageParticipantNotifyForm Class Reference
Inheritance diagram for PKPStageParticipantNotifyForm:
Form StageParticipantNotifyForm AddParticipantForm

Public Member Functions

 __construct ($itemId, $itemType, $stageId, $template=null)
 
 _logEventAndCreateNotification ($request, $submission)
 
 execute (... $functionParams)
 
 fetch ($request, $template=null, $display=false)
 
 getEmailVariableNames ($emailKey)
 
 getStageId ()
 
 isMessageRequired ()
 
 readInputData ()
 
 sendMessage ($userId, $submission, $request)
 
- Public Member Functions inherited from Form
 _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 ()
 
 initData ()
 
 isValid ()
 
 readUserVars ($vars)
 
 setData ($key, $value=null)
 
 setDefaultFormLocale ($defaultLocale)
 
 setTemplate ($template)
 
 validate ($callHooks=true)
 

Data Fields

 $_itemId
 
 $_itemType
 
 $_stageId
 
 $_submissionId
 
- Data Fields inherited from Form
 $_checks
 
 $_data
 
 $_errors
 
 $_template
 
 $cssValidation
 
 $defaultLocale
 
 $errorFields
 
 $errorsArray
 
 $formSectionErrors
 
 $requiredLocale
 
 $supportedLocales
 

Protected Member Functions

 _getMailTemplate ($submission, $templateKey, $includeSignature=true)
 
 _getStageTemplates ()
 

Detailed Description

Form to notify a user regarding a file.

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

Constructor & Destructor Documentation

◆ __construct()

PKPStageParticipantNotifyForm::__construct (   $itemId,
  $itemType,
  $stageId,
  $template = null 
)

Constructor.

Reimplemented from Form.

Reimplemented in StageParticipantNotifyForm.

Definition at line 44 of file PKPStageParticipantNotifyForm.inc.php.

References Form\addCheck(), DAORegistry\getDAO(), and isMessageRequired().

Member Function Documentation

◆ _getMailTemplate()

PKPStageParticipantNotifyForm::_getMailTemplate (   $submission,
  $templateKey,
  $includeSignature = true 
)
abstractprotected

Return app-specific mail template.

Parameters
$submissionSubmission
$templateKeystring
$includeSignatureboolean
Returns
SubmissionMailTemplate

Reimplemented in StageParticipantNotifyForm.

Referenced by fetch(), and sendMessage().

◆ _getStageTemplates()

PKPStageParticipantNotifyForm::_getStageTemplates ( )
abstractprotected

return app-specific stage templates.

Returns
array

Reimplemented in StageParticipantNotifyForm.

Referenced by fetch().

◆ _logEventAndCreateNotification()

PKPStageParticipantNotifyForm::_logEventAndCreateNotification (   $request,
  $submission 
)

Convenience function for logging the message sent event and creating the notification.

Parameters
$requestPKPRequest
$submissionSubmission

Definition at line 338 of file PKPStageParticipantNotifyForm.inc.php.

References SubmissionLog\logEvent().

Referenced by execute().

◆ execute()

PKPStageParticipantNotifyForm::execute (   $functionParams)

Execute the form's action. (Note that it is assumed that the form has already been validated.)

Parameters
mixed$functionArgs,...Arguments from the caller to be passed to the hook consumer
Returns
mixed Result from the consumer to be passed to the caller. Send a true-ish result if you want the caller to do something with the return value.

Reimplemented from Form.

Reimplemented in AddParticipantForm.

Definition at line 142 of file PKPStageParticipantNotifyForm.inc.php.

References _logEventAndCreateNotification(), PKPApplication\get(), DAORegistry\getDAO(), Form\getData(), and sendMessage().

◆ fetch()

PKPStageParticipantNotifyForm::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 AddParticipantForm.

Definition at line 72 of file PKPStageParticipantNotifyForm.inc.php.

References _getMailTemplate(), _getStageTemplates(), PKPServices\get(), DAORegistry\getDAO(), PKPTemplateManager\getManager(), and getStageId().

◆ getEmailVariableNames()

PKPStageParticipantNotifyForm::getEmailVariableNames (   $emailKey)

Get the available email template variable names for the given template name.

Parameters
$emailKeystring Email template key
Returns
array

Definition at line 270 of file PKPStageParticipantNotifyForm.inc.php.

◆ getStageId()

PKPStageParticipantNotifyForm::getStageId ( )

Get the stage ID

Returns
int

Definition at line 295 of file PKPStageParticipantNotifyForm.inc.php.

References $_stageId.

Referenced by fetch(), and AddParticipantForm\fetch().

◆ isMessageRequired()

PKPStageParticipantNotifyForm::isMessageRequired ( )

whether or not to include the Notify Users listbuilder true, by default.

Returns
boolean

Reimplemented in AddParticipantForm.

Definition at line 352 of file PKPStageParticipantNotifyForm.inc.php.

Referenced by __construct().

◆ readInputData()

PKPStageParticipantNotifyForm::readInputData ( )

Assign form data to user-submitted data. Can be overridden from subclasses.

Reimplemented from Form.

Reimplemented in AddParticipantForm.

Definition at line 135 of file PKPStageParticipantNotifyForm.inc.php.

References Form\readUserVars().

◆ sendMessage()

PKPStageParticipantNotifyForm::sendMessage (   $userId,
  $submission,
  $request 
)

Send a message to a user.

Parameters
$userIdint the user id to send email to.
$submissionSubmission
$requestPKPRequest

Definition at line 159 of file PKPStageParticipantNotifyForm.inc.php.

References _getMailTemplate(), PKPServices\get(), Core\getCurrentDate(), DAORegistry\getDAO(), and Form\getData().

Referenced by execute().

Field Documentation

◆ $_itemId

int PKPStageParticipantNotifyForm::$_itemId

The file/submission ID this form is for

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

◆ $_itemType

int PKPStageParticipantNotifyForm::$_itemType

The type of item the form is for (used to determine which email template to use)

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

◆ $_stageId

PKPStageParticipantNotifyForm::$_stageId

The stage Id

Definition at line 33 of file PKPStageParticipantNotifyForm.inc.php.

Referenced by getStageId().

◆ $_submissionId

int PKPStageParticipantNotifyForm::$_submissionId

the Submission id

Definition at line 39 of file PKPStageParticipantNotifyForm.inc.php.


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