class uc_views_handler_filter_country in Ubercart Views 6.3
Same name and namespace in other branches
- 6.2 views/uc_views_handler_filter_country.inc \uc_views_handler_filter_country
Filter by country code
Hierarchy
- class \uc_views_handler_filter_country extends \views_handler_filter_in_operator
Expanded class hierarchy of uc_views_handler_filter_country
2 string references to 'uc_views_handler_filter_country'
- uc_views_addresses_views_data in uc_views_addresses/
views/ uc_views_addresses.views.inc - Implementation of hook_views_data().
- uc_views_views_data in views/
uc_views.views.inc - Implementation of hook_views_data().
File
- views/
uc_views_handler_filter_country.inc, line 5
View source
class uc_views_handler_filter_country extends views_handler_filter_in_operator {
function get_value_options() {
if (!isset($this->value_options)) {
$this->value_title = t('Country');
$result = db_query("SELECT country_id,country_name FROM {uc_countries} WHERE version > 0 ORDER BY country_name");
while ($country = db_fetch_array($result)) {
$options[$country['country_id']] = $country['country_name'];
}
if (count($options) == 0) {
$options[] = t('No countries found.');
}
$this->value_options = $options;
}
}
}