function location_phone_views_tables in Location 5.3
File
- contrib/
location_phone/ location_phone.module, line 55 - Add phone number fields to Location address.
Code
function location_phone_views_tables() {
$tables['location_phone'] = array(
'name' => 'location_phone',
'join' => array(
'left' => array(
'table' => 'location',
'field' => 'lid',
),
'right' => array(
'field' => 'lid',
),
),
'fields' => array(
'phone' => array(
'name' => t('Location: Phone'),
'sortable' => TRUE,
),
),
'filters' => array(
'has_phone' => array(
'field' => 'phone',
'name' => t('Location: Has phone'),
'operator' => array(
'IS NOT' => t('Has phone'),
'IS' => t('No phone'),
),
'handler' => 'views_handler_filter_null',
),
),
);
return $tables;
}