See also: Writing Registry Plugins
- The name of the Plugin should match the format
- The Plugin should implement a
FooConfirmermodel and a corresponding controller (
- The Plugin must allow access to the
replyaction without authentication. This is typically done by adding
- The Plugin model must implement a
willHandlefunction to determine whether or not it will handle a given request.
- The Plugin controller must implement a
replyaction to handle (and typically an associated view).
A sample Confirmer plugin is available in
Confirmer Plugins operate at the platform, not CO level. When installed, they will be available to all COs. Although more than one Confirmer Plugin can be installed, only one Plugin can handle any given confirmation request. Plugins will be queried in alphabetical order until one indicates that it wants to handle the request. At that point, control is handed over to that Plugin and only that Plugin.
The Plugin must implement a decision function in the
FooConfirmer model, with the following signature:
- 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.
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
If the Plugin decides it wants to handle the request based on the information provided, it must return
true, otherwise it must return
If the Plugin indicated it wanted to handle the request, control is handed to the Plugin to perform whatever action it wants to, via the
reply action. It is expected that the Plugin will provide links to the Enrollee to accept or decline the invitation, or automatically redirect to the accept or decline URLs as appropriate.
The entry point to the Confirmer Plugin will be
To automatically generate confirmation buttons, add the following to the view file (
The following PHP variables must be set to include
$invite, holding the same information as was passed to
co_enrollment_flow, holding information about the relevant Enrollment Flow, if any