Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • AdvancedSearchForm
  • ContentControllerSearchExtension
  • EndsWithFilter
  • ExactMatchFilter
  • ExactMatchMultiFilter
  • FulltextFilter
  • FulltextSearchable
  • GreaterThanFilter
  • LessThanFilter
  • NegationFilter
  • PartialMatchFilter
  • SearchContext
  • SearchFilter
  • SearchForm
  • StartsWithFilter
  • StartsWithMultiFilter
  • SubstringFilter
  • WithinRangeFilter

Class SearchForm

Standard basic search form which conducts a fulltext search on all SiteTree objects.

If multilingual content is enabled through the Translatable extension, only pages the currently set language on the holder for this searchform are found. The language is set through a hidden field in the form, which is prepoluated with Translatable::get_current_locale() when then form is constructed.

Object
Extended by ViewableData implements IteratorAggregate
Extended by RequestHandler
Extended by Form
Extended by SearchForm

Direct known subclasses

AdvancedSearchForm

Package: sapphire\search
See: Use ModelController and SearchContext for a more generic search implementation based around DataObject
Located at sapphire/search/SearchForm.php

Methods summary

public static
# set_serch_mode( string $val )

устанавливает режим поиска

устанавливает режим поиска

Parameters

$val
string $val - режим * morphy - морфологический поиск (спец. символы не работают) * extended - поиск с выражениями: +слово -слово "как есть" * simple - поиск слов "как есть"
public
# __construct( Controller $controller, string $name, FieldSet $fields = null, FieldSet $actions = null )

Parameters

$controller
Controller $controller
$name
string $name The name of the form (used in URL addressing)
$fields
FieldSet $fields Optional, defaults to a single field named "Search". Search logic needs to be customized if fields are added to the form.
$actions
FieldSet $actions Optional, defaults to a single field named "Go".

Overrides

Form::__construct
public
# forTemplate( )

Return a rendered version of this form.

Return a rendered version of this form.

This is returned when you access a form as $FormObject rather than <% control FormObject %>

Overrides

Form::forTemplate
public
# classesToSearch( mixed $classes )

Set the classes to search. Currently you can only choose from "SiteTree" and "File", but a future version might improve this.

Set the classes to search. Currently you can only choose from "SiteTree" and "File", but a future version might improve this.

public DataObjectSet
# getResults( integer $pageLength = null, array $data = null )

Return dataObjectSet of the results using $_REQUEST to get info from form. Wraps around searchEngine().

Return dataObjectSet of the results using $_REQUEST to get info from form. Wraps around searchEngine().

Parameters

$pageLength
int $pageLength DEPRECATED 2.3 Use SearchForm->pageLength
$data
array $data Request data as an associative array. Should contain at least a key 'Search' with all searched keywords.

Returns

DataObjectSet
DataObjectSet
protected string
# addStarsToKeywords( string $keywords )

Добавляет * в конец слов с учетом других значений boolean mode

Добавляет * в конец слов с учетом других значений boolean mode

Parameters

$keywords
string $keywords - строка для поиска

Returns

string
string
public string
# getSearchQuery( array $data = null )

Get the search query for display in a "You searched for ..." sentence.

Get the search query for display in a "You searched for ..." sentence.

Parameters

$data
array $data

Returns

string
string
public
# setPageLength( integer $length )

Set the maximum number of records shown on each page.

Set the maximum number of records shown on each page.

Parameters

$length
int $length
public integer
# getPageLength( )

Returns

integer
int

Methods inherited from Form

Actions(), Controller(), FieldMap(), Fields(), FormAction(), FormAttributes(), FormEncType(), FormHttpMethod(), FormMethod(), FormName(), HiddenFields(), Message(), MessageType(), Name(), addErrorMessage(), addExtraClass(), buttonClicked(), callfieldmethod(), clearMessage(), current_action(), dataFieldByName(), debug(), defaultAction(), disableDefaultAction(), disableSecurityToken(), disable_all_security_tokens(), extraClass(), forAjaxTemplate(), formHtmlContent(), getData(), getExtraClasses(), getExtraFields(), getLegend(), getMessageFromSession(), getRecord(), getRedirectToFormOnValidationError(), getTemplate(), getValidator(), handleField(), httpSubmission(), loadDataFrom(), makeReadonly(), messageForForm(), removeExtraClass(), renderWithoutActionButton(), resetField(), resetValidation(), saveInto(), securityTokenEnabled(), sessionMessage(), setActions(), setButtonClicked(), setFields(), setFormAction(), setFormMethod(), setHTMLID(), setLegend(), setMessage(), setRedirectToFormOnValidationError(), setTarget(), setTemplate(), setValidator(), set_current_action(), setupFormErrors(), single_field_required(), testAjaxSubmission(), testSubmission(), transform(), transformTo(), unsetActionByName(), unsetAllActions(), unsetDataFieldByName(), unsetFieldFromTab(), unsetValidator(), validate()

Methods inherited from RequestHandler

allowedActions(), checkAccessAction(), getRequest(), handleRequest(), hasAction(), httpError()

Methods inherited from ViewableData

ATT_val(), BaseHref(), CSSClasses(), ColumnBreak(), ColumnCalc(), ColumnNumber(), ColumnPad(), ColumnPos(), CurrentMember(), CurrentPage(), Debug(), Even(), EvenOdd(), First(), FirstLast(), HasPerm(), IsAjax(), JS_val(), Last(), Me(), Middle(), MiddleString(), Modulus(), MultipleOf(), Odd(), Pos(), RAW_val(), SQL_val(), ThemeDir(), ThemeName(), Top(), TotalItems(), XML_val(), __get(), __isset(), __set(), buildCastingCache(), cachedCall(), castingClass(), castingHelper(), castingHelperPair(), castingObjectCreator(), castingObjectCreatorPair(), customise(), defineMethods(), escapeTypeForField(), getField(), getIterator(), getSecurityID(), getXMLValues(), hasField(), hasValue(), i18nLocale(), iteratorProperties(), obj(), renderWith(), setCustomisedObj(), setField()

Methods inherited from Object

__call(), __toString(), __wakeup(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), exists(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

protected integer $pageLength
#

$pageLength How many results are shown per page. Relies on pagination being implemented in the search results template.

$pageLength How many results are shown per page. Relies on pagination being implemented in the search results template.

protected array $classesToSearch
#

Classes to search

Classes to search

Properties inherited from Form

$IncludeFormTag, $actions, $buttonClickedFunc, $controller, $current_action, $extraClasses, $fields, $formMethod, $hasDefaultAction, $jsValidationIncluded, $legend, $message, $messageType, $name, $record, $redirectToFormOnValidationError, $security, $target, $template, $url_handlers, $validator

Properties inherited from RequestHandler

$allowed_actions, $brokenOnConstruct, $request

Properties inherited from ViewableData

$casting, $customisedObject, $default_cast, $failover, $iteratorPos, $iteratorTotalItems

Properties inherited from Object

$class, $extension_instances, $extensions

[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. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0