How to set the costumcontextsearch field names translateable
static $searchable_fields = array(
'Elamutyyp' => 'ExactMatchFilter',
'Hind' => 'ExactMatchFilter',
'Tubadearv' => 'ExactMatchFilter',
'Yldpind' => 'ExactMatchFilter',
'Linn' => 'ExactMatchFilter',
);
static $summary_fields = array(
'Elamutyyp',
'Hind',
'Tubadearv',
'Yldpind',
'Linn'
);
function getCustomSearchContext() {
$fields = $this->scaffoldSearchFields(array (
'restrictFields' => array (
'Elamutyyp' => 'Elamutyyp',
'Hind' => 'Hind',
'Tubadearv'=>'Tubadearv',
'Yldpind'=>'Yldpind',
'Linn'=>'Linn'
)
));
$filters = array (
'Elamutyyp' => new ExactMatchFilter('Elamutyyp'),
'Hind' => new ExactMatchFilter('Hind'),
'Tubadearv' => new ExactMatchFilter('Tubadearv'),
'Yldpind' => new ExactMatchFilter('Yldpind'),
'Linn' => new ExactMatchFilter('Linn')
);
return new SearchContext($this->class, $fields, $filters); }