Partially as an exercise, partially as a real need, I'm trying to wrap up a views plugin to provide a filter labeled Taxonomy Term: Has children terms
- so to allow terms that do/don't have direct children (depending on the option form setting). So far none of my hits was successful, they all ended up in "Broken handler" messages. Most probably because I declare table relations the wrong way.
Looking at how taxonomy.views.inc does it:
$data['taxonomy_term_hierarchy']['parent'] = array(
// ...
);
I tried:
function taxfil_views_data() {
$data = array();
$data['taxonomy_term_hierarchy']['tid'] = array(
'title' => t('Has children terms'),
'help' => t('Check if the term has direct children'),
'relationship' => array(
'base' => 'taxonomy_term_data',
'field' => 'tid',
'label' => t('Has kids'),
),
'filter' => array(
'help' => t('My Help'),
'handler' => 'views_handler_filter_taxfil',
),
);
return $data
}
I am also unsure about the parent class of the filter handler to extend, but at this point I'm close to thinking it does not really matter, as there is bigger problem in front of it.
Usually the example/tutorials base on own tables that a module creates, whereas mine has to re-use the existing.
Could anyone point me to the right direction?