mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
MINOR: Updated documentation
This commit is contained in:
parent
98e0c85937
commit
becbdcd9c6
4
INSTALL
4
INSTALL
@ -40,14 +40,14 @@ This following code should appear after the form creation.
|
||||
|
||||
<<<< CODE STARTS >>>>
|
||||
|
||||
$protector = SpamProtecterManager::update_form('MollomField', 'Captcha', $form, 'Message', $callbackObj);
|
||||
$protector = SpamProtecterManager::update_form($form, 'Message', $callbackObj);
|
||||
|
||||
<<<< CODE ENDS >>>>
|
||||
|
||||
What does this do?
|
||||
------------------
|
||||
|
||||
This code add an instance of a 'SpamProtecterField' class specified in SETTING UP THE MODULE section. The newly created field will have "MollomField" as a name and "Captcha" as a title. The third parameter is a Form object in which the field will be added into and the fourth parameter tells SpamProtecterManager to place the new field before a field named 'Message'. The last parameter is an object that get notified when the spam verification is done and given the form object.
|
||||
This code add an instance of a 'SpamProtecterField' class specified in SETTING UP THE MODULE section. The newly created field will have MollomField field. The first parameter is a Form object in which the field will be added into and the second parameter tells SpamProtecterManager to place the new field before a field named 'Message'. The last parameter is an object that get notified when the spam verification is done and given the form object.
|
||||
|
||||
The purpose of having callback object is we can process the submission differently according to the spam status of the submission. For example, put any submission with 'spam' status into spam queue.
|
||||
|
||||
|
@ -17,8 +17,6 @@ class SpamProtecterManager {
|
||||
|
||||
/**
|
||||
* Add the spam protecter field to a form
|
||||
* @param string the name of the protecter field
|
||||
* @param string the title of the protecter field
|
||||
* @param Form the form that the protecter field added into
|
||||
* @param string the name of the field that the protecter field will be added in front of
|
||||
* @param object an object that implements Spamable
|
||||
|
Loading…
Reference in New Issue
Block a user