SilverStripe\Akismet\AkismetField
Form field to handle akismet error display and handling
- Author: Damian Mooyman
Synopsis
class AkismetField
extends FormField
{
- // members
- private static boolean $is_spam_when_response_fails = false;
- private array $fieldMapping = ;
- protected $isSpam = NULL;
- // methods
- protected CheckboxField confirmationField()
- public void Field()
- public void FieldHolder()
- public array getSpamMappedData()
- public boolean validate()
- public boolean getIsSpam()
- public array getFieldMapping()
- public AkismetField setFieldMapping()
- public void saveInto()
Hierarchy
Extends
- SilverStripe\Forms\FormField
Members
private
- $fieldMapping — array
- $is_spam_when_response_fails
—
boolean
If the Akismet network response fails, it is neither true or false This is the value assigned on a 400
protected
- $isSpam — boolean
Methods
protected
- confirmationField() — Get the nested confirmation checkbox field
public
- Field()
- FieldHolder()
- getFieldMapping() — Get the fields to map spam protection too
- getIsSpam() — Determine if this field is spam or not
- getSpamMappedData()
- saveInto() — Allow spam flag to be saved to the underlying data record
- setFieldMapping() — Set the fields to map spam protection too
- validate() — This function first gets values from mapped fields and then checks these values against akismet and then notifies callback object with the spam checking result.