|
| ensure_table ($table, $relationship=NULL, $join=NULL) |
|
| init ($base_table='tripal_entity', $base_field='id', $options) |
|
| add_field ($table_alias, $field_name, $alias='', $params=[]) |
|
| add_where ($group, $field_name, $value=NULL, $operator=NULL) |
|
| add_where_expression ($group, $snippet, $args=[]) |
|
| add_orderby ($table, $field_name=NULL, $order='ASC', $alias='', $params=[]) |
|
| build (&$view) |
|
| execute (&$view) |
|
| placeholder () |
|
| add_relationship ($alias, $join, $base, $link_point=NULL) |
|
◆ add_orderby()
tripal_views_query::add_orderby |
( |
|
$table, |
|
|
|
$field_name = NULL , |
|
|
|
$order = 'ASC' , |
|
|
|
$alias = '' , |
|
|
|
$params = [] |
|
) |
| |
◆ add_relationship()
tripal_views_query::add_relationship |
( |
|
$alias, |
|
|
|
$join, |
|
|
|
$base, |
|
|
|
$link_point = NULL |
|
) |
| |
This function copied from views_plugin_query_default::add_relationship
◆ add_where()
tripal_views_query::add_where |
( |
|
$group, |
|
|
|
$field_name, |
|
|
|
$value = NULL , |
|
|
|
$operator = NULL |
|
) |
| |
Add a simple WHERE clause to the query.
- Parameters
-
$group | The WHERE group to add these to; groups are used to create AND/OR sections. Groups cannot be nested. Use 0 as the default group. If the group does not yet exist it will be created as an AND group. |
$field | The name of the field to check. |
$value | The value to test the field against. In most cases, this is a scalar. For more complex options, it is an array. The meaning of each element in the array is dependent on the $operator. |
$operator | The comparison operator, such as =, <, or >=. It also accepts more complex options such as IN, LIKE, or BETWEEN. Defaults to IN if $value is an array = otherwise. If $field is a string you have to use 'formula' here. |
◆ add_where_expression()
tripal_views_query::add_where_expression |
( |
|
$group, |
|
|
|
$snippet, |
|
|
|
$args = [] |
|
) |
| |
Add's a where exression clause to a query.
- Parameters
-
$group | The WHERE group to add these to; groups are used to create AND/OR sections. Groups cannot be nested. Use 0 as the default group. If the group does not yet exist it will be created as an AND group. |
$snippet | The snippet to check. This can be either a column or a complex expression like "UPPER(table.field) = 'value'". |
$args | An associative array of arguments. |
◆ build()
tripal_views_query::build |
( |
& |
$view | ) |
|
◆ ensure_table()
tripal_views_query::ensure_table |
( |
|
$table, |
|
|
|
$relationship = NULL , |
|
|
|
$join = NULL |
|
) |
| |
Ensure a table exists in the queue.
This function overrides the views_plugin_query version of the function but does nothing other than return the "table" (or bundle) name as we won't be using aliases for bundles.
- Parameters
-
$table | The unaliased name of the table to ensure. |
$relationship | The relationship to ensure the table links to. Each relationship will get a unique instance of the table being added. If not specified, will be the primary table. |
$join | A views_join object (or derived object) to join the alias in. |
- Returns
- The alias used to refer to this specific table, or NULL if the table cannot be ensured.
◆ execute()
tripal_views_query::execute |
( |
& |
$view | ) |
|
◆ placeholder()
tripal_views_query::placeholder |
( |
| ) |
|
Provides a unique placeholders for handlers.
The documentation for this class was generated from the following file:
- tripal/tripal_views_query.inc