|
| | handleAutocomplete (Request $request, int $match_limit=5) |
| |
| | handleGenericAutocomplete (Request $request, string $base_table, string $column_name, string $type_column, string $property_table, int $match_limit=10, int $type_id=0,) |
| |
|
|
bool | $include_pkey = TRUE |
| |
|
string | $match_operator = 'CONTAINS' |
| |
|
static array | $default_options = [] |
| |
Controller, Chado Organism Autocomplete.
- Deprecated:
- in tripal:4.0.0-alpha3 and is removed from tripal:4.1.0. All the methods in ChadoOrganismAutocompleteController now exist in ChadoOrganismFormElement class with the same functionality. Use \Drupal\tripal_chado\Controller\ChadoOrganismFormElement instead.
- See also
- https://tripaldoc.readthedocs.io/en/latest/dev_guide/deprecations/organism_autocomplete.html
◆ getPkeyId()
| static Drupal\tripal_chado\Controller\ChadoOrganismAutocompleteController::getPkeyId |
( |
string |
$value | ) |
|
|
static |
Fetch the pkey organism_id number, given an autocomplete value with a numeric ID in parentheses at the end of the string.
- Parameters
-
| string | $value | A value from an autocomplete with the ID in parentheses at the end, e.g. "Tripalus bogusii (ignored) (123)" |
- Returns
- int Primary key ID number of the record, or 0 if an unparsable $value was passed, which can happen if the user did not let the autocomplete supply a value.
Reimplemented from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController.
◆ getQuery()
| static Drupal\tripal_chado\Controller\ChadoOrganismAutocompleteController::getQuery |
( |
string |
$string, |
|
|
array |
$options |
|
) |
| |
|
static |
Returns a database query ready to execute.
This allows the same query to be used for both autocomplete and select.
- Parameters
-
| 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, default 10. If zero, there is no limit. |
- Returns
- ?\Drupal\pgsql\Driver\Database\pgsql\Select $query A database query object
Reimplemented from Drupal\tripal_chado\Controller\ChadoGenericAutocompleteController.
◆ handleAutocomplete()
| Drupal\tripal_chado\Controller\ChadoOrganismAutocompleteController::handleAutocomplete |
( |
Request |
$request, |
|
|
int |
$match_limit = 5 |
|
) |
| |
Controller method, autocomplete organism name.
- Parameters
-
| Request | request |
| int | $match_limit | Desired number of matching organism names to suggest. Default to 5 items. Must be declared in autocomplete route parameter i.e. ['match_limit' => 5]. |
- Returns
- Json Object Matching organism rows in an array where organism name is both the value to the array keys label and value.
The documentation for this class was generated from the following file:
- tripal_chado/src/Controller/ChadoOrganismAutocompleteController.php