Updating searchable fields w namespaces

This commit is contained in:
John Milmine 2017-12-06 22:37:25 +13:00 committed by GitHub
parent 5087ec764e
commit d44197530e
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',
], ],
]; ];