|
Tripal
|


Public Member Functions | |
| handleAutocomplete (Request $request, int $match_limit=5) | |
Public Member Functions inherited from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController | |
| handleGenericAutocomplete (Request $request, string $base_table, string $column_name, string $type_column, string $property_table, int $match_limit=10, int $type_id=0,) | |
Static Public Member Functions | |
| static | getQuery (string $string, array $options) |
| static | getPkeyId (?string $value=NULL) |
| static | getFormElement (array $element, mixed $default, array $options=[]) |
| static | getSelectElement (array $element, mixed $default, array $options=[]) |
| static | getAutocompleteElement (array $element, mixed $default, array $options=[]) |
| static | getSelectOptions (array $options) |
| static | validateAutocomplete ($element, FormStateInterface $form_state) |
Static Public Member Functions inherited from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController | |
| static | getDefaultOptions () |
| static | getPkeyId (string $value) |
Additional Inherited Members | |
Protected Attributes inherited from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController | |
| bool | $include_pkey = TRUE |
| string | $match_operator = 'CONTAINS' |
Static Protected Attributes inherited from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController | |
| static array | $default_options = [] |
Controller, Chado Organism Autocomplete.
|
static |
Provides a textfield form element that autocompletes with chado organisms.
| array | $element | The form element array to be populated. |
| mixed | $default | The default value, either an integer pkey ID or a string. |
| array | $options | select_limit - The maximum number of options to show in a select list. match_operator - Either 'CONTAINS' (default) or 'STARTS_WITH'. match_limit - Desired number of autocomplete matching names to suggest. size - The size of the textfield for autocomplete. placeholder - Placeholder text for the autocomplete textfield. |
|
static |
Returns a form element array, either a select or an autocomplete.
| array | $element | The form element array to be populated. |
| mixed | $default | The default value, either an integer pkey ID or a string. |
| array | $options | The following keys are used:
|
|
static |
Fetch the pkey organism_id number, given an autocomplete value.
The value includes a numeric ID in parentheses at the end of the string.
| ?string | $value A value from an autocomplete with the ID in parentheses at the end, e.g. "Tripalus bogusii (ignored) (123)". |
|
static |
Returns a database query ready to execute.
This allows the same query to be used for both autocomplete and select.
| string | $string | The string to be autocompleted, used to limit the query. The string "%" has the special meaning of return all records. |
| array | $options | The following keys are used: match_operator - Either 'CONTAINS' (default) or 'STARTS_WITH'. match_limit - Desired number of autocomplete matching names to suggest. |
Reimplemented from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController.
|
static |
Provides a Drupal form element with a select list of Chado organisms.
| array | $element | The form element array to be populated. |
| mixed | $default | The default value, either an integer pkey ID or a string. |
| array | $options | select_limit - The maximum number of options to show in a select list. match_operator - Either 'CONTAINS' (default) or 'STARTS_WITH'. match_limit - Desired number of matching names to suggest. |
|
static |
Provides an organism list for use as select options.
| array | $options | select_limit - The maximum number of options to show in a select list. match_limit - Desired number of matching names to suggest. |
| Drupal\tripal_chado\Controller\ChadoOrganismFormElementController::handleAutocomplete | ( | Request | $request, |
| int | $match_limit = 5 |
||
| ) |
Controller method, autocomplete organism name.
| Symfony\Component\HttpFoundation\Request | $request | The request object. |
| int | $match_limit | Desired number of matching organism names to suggest. Default to 5 items. Must be declared in autocomplete route parameter. |
|
static |
Form element validation handler for an autocomplete field.
| array | $element | The form element being validated. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state of the (entire) configuration form. |