Level51\AjaxSelectField\AjaxSelectFieldTrait
Synopsis
trait AjaxSelectFieldTrait
{
- // members
- private static array $allowed_actions = ;
- private integer $minSearchChars = 3;
- private string|null $searchEndpoint = NULL;
- private callable|null $searchCallback = NULL;
- private string|null $placeholder = NULL;
- private array|null $getVars = NULL;
- private array|null $searchHeaders = NULL;
- // methods
- public HTTPResponse search()
- public $this setEndpoint()
- public $this setSearchCallback()
- public $this setMinSearchChars()
- public $this setPlaceholder()
- public $this setGetVars()
- public AjaxSelectField setSearchHeaders()
Hierarchy
Members
private
- $allowed_actions
- $getVars — Level51\AjaxSelectField\array|null
- $minSearchChars — int
- $placeholder — Level51\AjaxSelectField\string|null
- $searchCallback — Level51\AjaxSelectField\callable|null
- $searchEndpoint — Level51\AjaxSelectField\string|null
- $searchHeaders — Level51\AjaxSelectField\array|null
Methods
public
- search() — Endpoint for search requests, if no custom searchEndpoint is set.
- setEndpoint() — Set a custom endpoint for all search requests.
- setGetVars() — Set a list of custom GET vars which should be added to each request.
- setMinSearchChars() — Define the min length of search terms needed to execute the search.
- setPlaceholder() — Set a custom placeholder.
- setSearchCallback() — Pass in a callback which should be executed on search requests.
- setSearchHeaders() — Set a list of custom request headers sent with each search request.