[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/station/schedule/views/ -> station_schedule_handler_field_time.inc (source)

   1  <?php
   2  // $Id: station_schedule_handler_field_time.inc,v 1.3 2010/11/18 05:23:38 timplunkett Exp $
   3  
   4  class station_schedule_handler_field_time extends views_handler_field {
   5    function option_definition() {
   6      $options = parent::option_definition();
   7      $options['style'] = array('default' => 'station_hour');
   8      return $options;
   9    }
  10  
  11    function options_form(&$form, &$form_state) {
  12      parent::options_form($form, $form_state);
  13  
  14      $form['style'] = array(
  15        '#type' => 'radios',
  16        '#title' => t('Style'),
  17        '#options' => array(
  18          'station_hour' => t('Hour'),
  19          'station_dayhour' => t('Day/hour'),
  20          'station_day' => t('Day'),
  21        ),
  22        '#default_value' => $this->options['style'],
  23        '#description' => t('Which time style should be used.'),
  24      );
  25    }
  26  
  27    function render($values) {
  28      if (isset($values->{$this->field_alias})) {
  29        return theme($this->options['style'], $values->{$this->field_alias});
  30      }
  31    }
  32  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7