Merge pull request #7683 from pitchandtone/patch-7

Updating searchable fields w namespaces
This commit is contained in:
Daniel Hensby 2017-12-06 12:45:20 +00:00 committed by GitHub
commit daaaea9dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ class MyDataObject extends DataObject
private static $searchable_fields = [ private static $searchable_fields = [
'Name' => 'PartialMatchFilter', 'Name' => 'PartialMatchFilter',
'ProductCode' => 'NumericField' 'ProductCode' => NumericField::class
]; ];
} }
``` ```
@ -102,12 +102,12 @@ class MyDataObject extends DataObject
private static $searchable_fields = [ private static $searchable_fields = [
'Name' => [ 'Name' => [
'field' => 'TextField', 'field' => TextField::class,
'filter' => 'PartialMatchFilter', 'filter' => 'PartialMatchFilter',
], ],
'ProductCode' => [ 'ProductCode' => [
'title' => 'Product code #', 'title' => 'Product code #',
'field' => 'NumericField', 'field' => NumericField::class,
'filter' => 'PartialMatchFilter', 'filter' => 'PartialMatchFilter',
], ],
]; ];