Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The name of the Plugin should match the format FooConfirmer.
  2. The Plugin should implement a FooConfirmer model and a corresponding controller (FooConfirmerControllerFooConfirmersController).
  3. The Plugin must allow access to the reply action without authentication. This is typically done by adding $this->Auth→allow('reply'); to beforeFilter.
  4. The Plugin model must implement a willHandle function to determine whether or not it will handle a given request.
  5. The Plugin controller must implement a reply action to handle (and typically an associated view).

A sample Confirmer plugin is available in AvailablePlugin/TestConfirmer.

...

  • coId: The ID of the CO associated with the invitation
  • coInvite: An array of information about the invitation, corresponding to cm_co_invites.
  • coPetition: An array of information about the petition (if any), corresponding to cm_co_petitions.

(info) The CO Person ID will generally be available in $coInvite['co_person_id'], and the Enrollment Flow ID (if applicable) will generally be available in $coPetition['co_enrollment_flow_id'].

Return Values

If the Plugin decides it wants to handle the request based on the information provided, it must return true, otherwise it must return false.

...

The entry point to the Confirmer Plugin will be /foo_confirmer/foo_confirmers/reply/inviteid. 

To automatically generate confirmation buttons, add the following to the view file (reply.ctp):

Code Block
include APP . DS . "View" . DS . "CoInvites" . DS . "buttons.inc";

The following PHP variables must be set to include buttons.inc:

  • $invite, holding the same information as was passed to willHandle() in $coInvite
  • $co_enrollment_flow, holding information about the relevant Enrollment Flow, if any