class biblio_handler_argument_many_to_one in Bibliography Module 6
Same name and namespace in other branches
- 6.2 views/biblio_handler_argument_many_to_one.inc \biblio_handler_argument_many_to_one
- 7 views/biblio_handler_argument_many_to_one.inc \biblio_handler_argument_many_to_one
- 7.2 views/biblio_handler_argument_many_to_one.inc \biblio_handler_argument_many_to_one
Argument handler for 'associated tables'. (Used for types, authors, keywords)
Hierarchy
- class \biblio_handler_argument_many_to_one extends \views_handler_argument_many_to_one
Expanded class hierarchy of biblio_handler_argument_many_to_one
1 string reference to 'biblio_handler_argument_many_to_one'
- biblio_views_data in ./
biblio.views.inc - Implementation of hook_views_data().
File
- views/
biblio_handler_argument_many_to_one.inc, line 6
View source
class biblio_handler_argument_many_to_one extends views_handler_argument_many_to_one {
/**
* Override the behavior of title_query(). Get the corresponding names (instead of the ID values).
*/
function title_query() {
$names = array();
$result = db_query('SELECT ' . $this->name_field . ' FROM {' . $this->name_table . '} WHERE ' . $this->real_field . ' IN (' . db_placeholders($this->value) . ')', $this->value);
while ($row = db_fetch_object($result)) {
$names[] = $row->{$this->name_field};
}
return !empty($names) ? $names : array(
t('Invalid input'),
);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
biblio_handler_argument_many_to_one:: |
function | Override the behavior of title_query(). Get the corresponding names (instead of the ID values). |