field handler

Events happening in the community are now at Drupal community events on www.drupal.org.
cmos's picture

Views 3 virtual numeric field handler question.

I've created a custom handler for a counter virtual field for my module but it seems that I am doing something wrong since I can't sort it nor filter on it as a numeric field.
Any one can tell what I need to add to the query method in order to actually place the values in the tables for views to use it?

<?php
class mymodule_handler_field_count_for_interval extends views_handler_field_numeric {

function mymodule_count($nid){
    $count=0;
    if (isset($this->view->filter['timestamp'])) {
        $filter_operator=strtoupper($this->view->filter['timestamp']->operator);
Read more
jeff00seattle's picture

Custom Sort View Handler is Ignored

Hi

I have read the link http://drupal.org/node/357079, but my custom sort handler is not getting called.

Implemented is the following empty sort handler. However, when I select the activated table-style column to sort, this sort handler is ignored.
<?php
class region_views_handler_sort extends views_handler_sort {
function query() {
parent::query();
drupal_set_message('region_id custom query()');
}

function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);

Read more
Subscribe with RSS Syndicate content