interface SearchServiceInterface in Fast Autocomplete 7
Interface defining the methods backend search services have to implement.
Before a service object is used, the corresponding server's data will be read from the database (see AbstractSearchService for a list of fields).
Hierarchy
- interface \Drupal\fac\SearchService\SearchServiceInterface
Expanded class hierarchy of SearchServiceInterface
All classes that implement SearchServiceInterface
File
- src/
SearchService/ SearchServiceInterface.php, line 11
Namespace
Drupal\fac\SearchServiceView source
interface SearchServiceInterface {
/**
* Constructs a service object.
*/
public function __construct();
/**
* Form constructor for the service configuration form.
*
* @param array $form
* The service options part of the form.
* @param array $form_state
* The current form state.
*
* @return array
* A form array for setting service-specific options.
*/
public function configurationForm(array $form, array &$form_state);
/**
* Validation callback for the form returned by configurationForm().
*
* Use form_error() to flag errors on form elements.
*
* @param array $form
* The form returned by configurationForm().
* @param array $values
* The part of the $form_state['values'] array corresponding to this form.
* @param array $form_state
* The complete form state.
*/
public function configurationFormValidate(array $form, array &$values, array &$form_state);
/**
* Submit callback for the form returned by configurationForm().
*
* This method should set the options of this service according to
* $values.
*
* @param array $form
* The form returned by configurationForm().
* @param array $values
* The part of the $form_state['values'] array corresponding to this form.
* @param array $form_state
* The complete form state.
*/
public function configurationFormSubmit(array $form, array &$values, array &$form_state);
/**
* Performs a search call.
*
* @param string $key
* The key to use in the search query.
* @param string $language
* The language to use in the search query.
*
* @return array
* A keyed array with an array of items. Each item is a keyed array of
* entity_type and the entity_id.
*
* Example array structure:
* array(
* 'suggestions' => array(
* array(
* 'entity_type => 'node',
* 'etid => 1,
* ),
* array(
* entity_type => 'node',
* etid => 2,
* ),
* );
*/
public function search($key, $language);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchServiceInterface:: |
public | function | Form constructor for the service configuration form. | 1 |
SearchServiceInterface:: |
public | function | Submit callback for the form returned by configurationForm(). | 1 |
SearchServiceInterface:: |
public | function | Validation callback for the form returned by configurationForm(). | 1 |
SearchServiceInterface:: |
public | function | Performs a search call. | 1 |
SearchServiceInterface:: |
public | function | Constructs a service object. | 1 |