views integration start, not sure to keep that
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
fbaa166db8
commit
6ab6fc916b
17
tode.module
17
tode.module
@ -33,6 +33,21 @@ function tode_menu() {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_views_api().
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
TODO hook_views_api().
|
||||||
|
*/
|
||||||
|
// function tode_views_api() {
|
||||||
|
// return array(
|
||||||
|
// 'api' => 3,
|
||||||
|
// 'path' => drupal_get_path('module', 'tode') . '/views',
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_theme().
|
* Implementation of hook_theme().
|
||||||
*/
|
*/
|
||||||
@ -727,3 +742,5 @@ function _tode_get_tode_fields_def($node){
|
|||||||
|
|
||||||
return $tode_fields;
|
return $tode_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
33
views/tode.views.inc
Normal file
33
views/tode.views.inc
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_views_data().
|
||||||
|
*/
|
||||||
|
// function tode_views_data() {
|
||||||
|
// // Code goes here. See example at http://views.doc.logrus.com/group__views__hooks.html#g227057901681e4a33e33c199c7a8c989
|
||||||
|
//
|
||||||
|
// $data['node']['tode_parent'] = array(
|
||||||
|
// 'group' => t('tode'),
|
||||||
|
// 'title' => t('Tode'),
|
||||||
|
// 'help' => t('Filtrer with tode parent term.'), // The help that appears on the UI,
|
||||||
|
// // 'real field' => 'field_pv_value',
|
||||||
|
// 'filter' => array(
|
||||||
|
// 'handler' => 'tode_views_handler_parent_filter',
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
function tode_views_data_alter(&$data) {
|
||||||
|
$data['tid']['tode_parent'] = array(
|
||||||
|
'title' => t('Tode parent'),
|
||||||
|
'group' => 'Tode',
|
||||||
|
'help' => t('Parent term of tode field'),
|
||||||
|
'real field' => 'field_tode_program',
|
||||||
|
'filter' => array(
|
||||||
|
'handler' => 'tode_views_handler_parent_filter',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
0
views/tode_views_handler_parent_filter.inc
Normal file
0
views/tode_views_handler_parent_filter.inc
Normal file
Loading…
x
Reference in New Issue
Block a user