SilverCart\Admin\Forms\GridField\GridFieldAddExistingAutocompleter
This class is is responsible for adding objects to another object's has_many and many_many relation, as defined by the {@link RelationList} passed to the GridField constructor.
Objects can be searched through an input field (partially matching one or
more fields).
Selecting from the results will add the object to the relation.
Often used alongside for detaching existing
records from a relatinship.
For easier setup, have a look at a sample configuration in
.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class GridFieldAddExistingAutocompleter
extends GridFieldAddExistingAutocompleter
{
- // methods
- public array|null scaffoldSearchFields()
- public string doSearch()
Hierarchy
Extends
- SilverStripe\Forms\GridField\GridFieldAddExistingAutocompleter
Methods
public
- doSearch() — Disables the linear DataList sort to support searching for Translation objects.
- scaffoldSearchFields() — Detect searchable fields and searchable relations Only has_many relations may be searched.