function views_crosstab_table::crosstab_match_field in Views Crosstab 7
Determines if a field defined in the options matches a field or real field in the view's query.
Parameters
$string $query_field: The name of the field (or real field) from the view's query
$string $option_field: The name of the field from the view's definition
Return value
boolean TRUE iff they match
1 call to views_crosstab_table::crosstab_match_field()
- views_crosstab_table::query in plugins/
views_crosstab_table.inc - Add cross table column fields and alter the query.
File
- plugins/
views_crosstab_table.inc, line 455 - Plugin functions
Class
- views_crosstab_table
- Style plugin to transform a linear query into a crosstab table.
Code
function crosstab_match_field($query_field, $option_field) {
// First check for a field defined using the field's name
// Then check for a field defined with a different 'real field'
return $option_field == $query_field || isset($this->view->field[$option_field]->definition['real field']) && $this->view->field[$option_field]->definition['real field'] == $query_field;
}