Merge pull request #1181 from dhensby/pulls/injector-searc-form

FIX Use SearchForm::create to instantiate SearchForm
This commit is contained in:
Ingo Schommer 2015-04-29 00:11:52 +12:00
commit 221281dade

View File

@ -27,7 +27,7 @@ class ContentControllerSearchExtension extends Extension {
$actions = new FieldList(
new FormAction('results', _t('SearchForm.GO', 'Go'))
);
$form = new SearchForm($this->owner, 'SearchForm', $fields, $actions);
$form = SearchForm::create($this->owner, 'SearchForm', $fields, $actions);
$form->classesToSearch(FulltextSearchable::get_searchable_classes());
return $form;
}