Tripal
|
Public Member Functions | |
addRelationship ($table, $alias, $field) | |
relationshipCondition ($table, $field, $value, $op) | |
execute () | |
queryCallback () | |
__toString () | |
Public Attributes | |
$relationships = [] | |
$relationshipConditions = [] | |
Protected Member Functions | |
_intersectResults ($current_results, $new_results) | |
queryStorageCallback ($storage) | |
Protected Attributes | |
$includes = [] | |
Extends the EntityFieldQuery to support queries from multiple storage types.
TripalFieldQuery::__toString | ( | ) |
Allows query object to be dumped as a string.
|
protected |
Generates an intersection of results from different storage back-ends.
TripalFieldQuery::addRelationship | ( | $table, | |
$alias, | |||
$field | |||
) |
Adds a relationship via a table join to the tripal_entity table
This is specific for Drupal schema tables and is useful for Views integration when non Tripal Storage API fields are attached to an entity.
$table | The name of the table to join. |
$alias | The alias for the table. |
$field | The field to join on. |
TripalFieldQuery::execute | ( | ) |
Overrides the EntityFieldQuery::execute() function.
TripalFieldQuery::queryCallback | ( | ) |
Overrides the EntityFieldQuery::queryCallback function.
|
protected |
Determines the query callback to use for this entity query.
This function is a replacement for queryCallback() from the parent EntityFieldQuery class because that class only allows a single storage type per query.
$storage | The storage module |
EntityFieldQueryException |
TripalFieldQuery::relationshipCondition | ( | $table, | |
$field, | |||
$value, | |||
$op | |||
) |
Adds a where statement to a relationship.
The relationship is added by the $table
|
protected |
Holds a list of fields that should be included in the results
TripalFieldQuery::$relationships = [] |
These member variables keep track of join relationships with the tripal_entity table. This is useful for non Tripal Storage API fields that want to filter based on on other Drupal tables. The most important example for this would be Drupal Views. These variables are only meant to be used by the tripal_field_storage_query() function as that is the only storage system that should be doing queries on the tripal_entity table itself.