2017-07-07 14:23:01 +12:00
|
|
|
<?php
|
|
|
|
|
2017-08-28 10:53:32 +12:00
|
|
|
namespace SilverStripe\SpamProtection\Tests\FormSpamProtectionExtensionTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\Forms\TextField;
|
|
|
|
use SilverStripe\SpamProtection\SpamProtector;
|
|
|
|
|
2017-07-07 14:23:01 +12:00
|
|
|
/**
|
|
|
|
* @package spamprotection
|
|
|
|
*/
|
2017-08-28 10:53:32 +12:00
|
|
|
class BarProtector implements SpamProtector, TestOnly
|
2017-07-07 14:23:01 +12:00
|
|
|
{
|
|
|
|
public function getFormField($name = null, $title = null, $value = null)
|
|
|
|
{
|
|
|
|
$title = $title ?: 'Bar';
|
|
|
|
return new TextField($name, $title, $value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setFieldMapping($fieldMapping)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|