Source of file InvisibleSpamProtector.php
Size: 1,102 Bytes - Last Modified: 2021-12-23T10:46:34+00:00
/var/www/docs.ssmods.com/process/src/src/Form/InvisibleSpamProtector.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | <?php namespace Sunnysideup\SimplestSpam\Form; use SilverStripe\SpamProtection\SpamProtector; use Sunnysideup\SimplestSpam\Form\InvisibleSpamField; /** * Protecter class to handle spam protection interface * * @package simplest spam field * @author nicolaas[at] sunnysideup.co.nz */ class InvisibleSpamProtector implements SpamProtector { protected $field; /** * Return the Field that we will use in this protector * * @return string */ public function getFieldName() { return InvisibleSpamField::class; } /** * @return bool */ public function updateForm($form, $before=null, $fieldsToSpamServiceMapping=null) { return $form->Fields(); } public function setFieldMapping($fieldMapping) { } public function getFormField($name = null, $title = null, $value = null, $form = null, $rightTitle = null) { return new InvisibleSpamField($name, $title, $value, $form, $rightTitle); } public function sendFeedback($object = null, $feedback = "") { return true; } } |