Version: current

     1 <?php
     2 /**
     3  * This class acts as a template for spam protecting form field, for instance MollomField.
     4  *
     5  * @package spamprotection
     6  */
     7 abstract class SpamProtectorField extends FormField {
     8
     9     /**
    10      * Fields to map spam protection too.
    11      *
    12      * @var array
    13      */
    14     private $spamFieldMapping = array();
    15
    16
    17     /**
    18      * Set the fields to map spam protection too
    19      *
    20      * @param Array array of Field Names, where the indexes of the array are the field names of the form and the values are the field names of the spam/captcha service
    21      */
    22     public function setFieldMapping($array) {
    23         $this->spamFieldMapping = $array;
    24     }
    25
    26     /**
    27      * Get the fields that are mapped via spam protection
    28      *
    29      * @return Array
    30      */
    31     public function getFieldMapping() {
    32         return $this->spamFieldMapping;
    33     }
    34 }

[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. -