Class SearchFilter
Base class for filtering implementations, which work together with SearchContext to create or amend a query for DataObject instances. See
SearchContext for more information.
- Object
-
SearchFilter
Direct known subclasses
EndsWithFilter,
ExactMatchFilter,
StartsWithMultiFilter,
SubstringFilter,
WithinRangeFilter,
ExactMatchFilterWithEmpty,
ExactMatchMultiFilter,
FulltextFilter,
GreaterThanFilter,
LessThanFilter,
NegationFilter,
PartialMatchFilter,
StartsWithFilter
Package: sapphire\search
Used by:
ModelAdmin::getModelForms() Located at sapphire/search/filters/SearchFilter.php
Methods summary
public
|
|
protected
|
#
addRelation( string $name )
Called by constructor to convert a string pathname into a well defined relationship sequence. |
public
|
|
public
|
|
public
string
|
|
public
string
|
|
public
string
|
#
getFullName( )
The full name passed to the constructor, including any (optional) relations in dot notation. |
public
string
|
|
public
string
|
|
public
|
#
applyRelation(
Traverse the relationship fields, and add the table mappings to the query object state. This has to be called in any overloaded SearchFilter->apply() methods manually. |
abstract public
|
|
public
boolean
|
#
isEmpty( )
Determines if a field has a value, and that the filter should be applied.
Relies on the field being populated with |
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(),
defineMethods(),
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
string
|
$model |
#
Classname of the inspected |
protected
string
|
$name | |
protected
string
|
$fullName | |
protected
mixed
|
$value | |
protected
string
|
$relation |
#
Name of a has-one, has-many or many-many relation (not the classname). Set in
the constructor as part of the name in dot-notation, and used in |