FormSpamProtectionExtension
class FormSpamProtectionExtension extends Extension (View source)
An extension to the Form class which provides the method enableSpamProtection() helper.
Traits
Provides extensions to this object to integrate it with standard config API methods.
Config options
| allowed_actions | This is used by extensions designed to be applied to controllers.  | 
                from Extension | |
| default_spam_protector | string | ||
| mappable_fields | array | ||
| field_name | string | 
Properties
| protected | object | $owner | The object this extension is applied to.  | 
                from Extension | 
Methods
Called when this extension is added to a particular class
Temporarily modify the owner. The original owner is ensured to be restored
Clear the current owner, and restore extension to the state prior to the last setOwner()
Helper method to strip eval'ed arguments from a string that's passed to DataObject::$extensions or Object::add_extension().
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
Instantiate a SpamProtector instance
Details
        
                            
    __construct()
        
    
    No description
        
                static            
    add_to_class(string $class, string $extensionClass, mixed $args = null)
        
    
    Called when this extension is added to a particular class
        
                            
    setOwner(object $owner)
        
    
    Set the owner of this extension.
        
                            mixed
    withOwner(mixed $owner, callable $callback, array $args = [])
        
    
    Temporarily modify the owner. The original owner is ensured to be restored
        
                            
    clearOwner()
        
    
    Clear the current owner, and restore extension to the state prior to the last setOwner()
        
                            object
    getOwner()
        
    
    Returns the owner of this extension.
        
                static            string
    get_classname_without_arguments(string $extensionStr)
        
    
    Helper method to strip eval'ed arguments from a string that's passed to DataObject::$extensions or Object::add_extension().
        
                static            Config_ForClass
    config()
        
    
    Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
        
                            mixed
    stat(string $name)
        deprecated
    
    deprecated
Get inherited config value
        
                            mixed
    uninherited(string $name)
        
    
    Gets the uninherited value for the given config option
        
                            $this
    set_stat(string $name, mixed $value)
        deprecated
    
    deprecated
Update the config value for a given property
        
                static            SpamProtector|null
    get_protector(array $options = null)
        
    
    Instantiate a SpamProtector instance
        
                            object
    enableSpamProtection(array $options = array())
        
    
    Activates the spam protection module.