views_raw_sql.module in Views Raw SQL 6
File
views_raw_sql.module
View source
<?php
function views_raw_sql_permission() {
return array(
'edit views raw sql' => array(
'title' => t('Add or edit Views raw SQL fields and sorts'),
),
);
}
function views_raw_sql_views_api() {
return array(
'api' => 2,
'path' => drupal_get_path('module', 'views_raw_sql'),
);
}
function views_raw_sql_views_data() {
$data = array();
$data['views_raw_sql'] = array(
'table' => array(
'group' => t('Raw SQL'),
'join' => array(
'#global' => array(),
),
),
);
$data['views_raw_sql']['raw_field'] = array(
'title' => t('Raw field'),
'help' => t('Provide raw SQL field expression.'),
'field' => array(
'handler' => 'views_handler_field_views_raw_sql',
),
);
$data['views_raw_sql']['raw_sort'] = array(
'title' => t('Raw sort'),
'help' => t('Provide raw SQL sort exporession.'),
'sort' => array(
'handler' => 'views_handler_sort_views_raw_sql',
),
);
return $data;
}
function views_raw_sql_views_handlers() {
return array(
'info' => array(),
'handlers' => array(
'views_handler_field_views_raw_sql' => array(
'parent' => 'views_handler_field',
),
'views_handler_sort_views_raw_sql' => array(
'parent' => 'views_handler_sort',
),
),
);
}