SearchControllerExtension
class SearchControllerExtension extends Extension (View source)
Adds a search form and handling method to a Controller instance, using the configured CWP search engine
Traits
Provides extensions to this object to integrate it with standard config API methods.
Config options
| allowed_actions | |||
| results_per_page | int | How many search results should be shown per-page?  | 
                |
| search_follow_suggestions | bool | If spelling suggestions for searches are given, enable suggested searches to be followed immediately  | 
                |
| classes_to_search | array | Which classes should be queried when searching?  | 
                
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
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
        
                            
    SearchForm()
        
    
    Site search form
        
                            SearchForm
    HeaderSearchForm()
        
    
    Get search form with _header suffix
        
                            DBHTMLText
    results(array $data, SearchForm $form, HTTPRequest $request)
        
    
    Process and render search results.
        
                    protected        array
    getResultsTemplate(HTTPRequest $request)
        
    
    Select the template to render search results with