Class SpamProtectorManager
This class is responsible for setting an system-wide spam protector field and
add the protecter field to a form.
Methods summary
public static
|
#
set_spam_protector( String $protector )
Set the name of the spam protecter class
Set the name of the spam protecter class
Parameters
- $protector
- String the name of protecter field class
|
public static
|
#
get_spam_protector( )
Get the name of the spam protector class
Get the name of the spam protector class
|
public static
SpamProtector
|
#
update_form( Form $form, string $before = null, array $fieldsToSpamServiceMapping = array(), String $title = null, String $rightTitle = null )
Add the spam protector field to a form
Add the spam protector field to a form
Parameters
- $form
- Form the form that the protecter field added into
- $before
- string the name of the field that the protecter field will be added in front of
- $fieldsToSpamServiceMapping
- array an associative array with the name of the spam web service's field, for
example post_title, post_body, author_name and a string of field names
- $title
- String Title for the captcha field
- $rightTitle
- String RightTitle for the captcha field
Returns
SpamProtectorobject on success or null if the spamprotector class is not found also null if
spamprotectorfield creation fails.
|
public static
|
#
send_feedback( DataObject $object, String $feedback )
Send Feedback to the Spam Protection. The level of feedback will depend on
the Protector class.
Send Feedback to the Spam Protection. The level of feedback will depend on
the Protector class.
Parameters
- $object
- DataObject The Object which you want to send feedback about. Must have a
SessionID field.
- $feedback
- String Feedback on the $object usually 'spam' or 'ham' for non spam entries
|
Magic methods summary
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-