| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: station_schedule_handler_field_time_range.inc,v 1.3 2009/09/22 21:56:21 drewish Exp $ 3 4 class station_schedule_handler_field_time_range extends views_handler_field { 5 function option_definition() { 6 $options = parent::option_definition(); 7 $options['style'] = array('default' => 'station_hour_range'); 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_duration' => t('Duration'), 19 'station_hour_range' => t('Hour range'), 20 'station_dayhour_range' => t('Day/hour range'), 21 ), 22 '#default_value' => $this->options['style'], 23 '#description' => t('Which time style should be used.'), 24 ); 25 } 26 27 function query() { 28 // Since 'time' isn't a real field just add in our additional fields and 29 // be done with it. 30 $this->ensure_my_table(); 31 $this->add_additional_fields(); 32 } 33 34 function render($values) { 35 if (isset($values->{$this->aliases['start']})) { 36 return theme($this->options['style'], $values->{$this->aliases['start']}, $values->{$this->aliases['finish']}); 37 } 38 } 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |