/**
  * Defines the result for hook_views_data().
  *
  * For the Fundraiser Sustainer record entity. This allows filtering on
  * gateway response using "is null" and "is not null".
  *
  * This also adds a join on fundraiser_donation, which I copied from the
  * original Springboard Views implementation of hook_views_data for
  * the sustainers table.
  *
  * @return array
  *   Data for Views.
  */
 public function views_data()
 {
     $data = parent::views_data();
     $table = $this->info['base table'];
     // Adds support for filtering on null values.
     $data[$table]['gateway_resp']['filter']['allow empty'] = TRUE;
     // Adds a join against fundraiser_donation.
     $data[$table]['table']['join']['fundraiser_donation'] = array('left_field' => 'did', 'field' => 'did');
     return $data;
 }
예제 #2
0
 /**
  * Defines the result for hook_views_data().
  */
 public function views_data()
 {
     $data = parent::views_data();
     //dsm($data);
     $data['tincan_statement']['stored'] = array('title' => t('Stored'), 'help' => t('Stored date value, the date the statement was stored'), 'field' => array('handler' => 'tincan_lrs_handler_field_datetime', 'click sortable' => TRUE), 'sort' => array('handler' => 'tincan_lrs_handler_sort_date'), 'filter' => array('handler' => 'tincan_lrs_handler_filter_datetime'), 'argument' => array('handler' => 'views_handler_argument_tincanlrs_fulldate'));
     $data['tincan_statement']['timestamp'] = array('title' => t('Timestamp'), 'help' => t('Timestamp of the statement'), 'field' => array('handler' => 'tincan_lrs_handler_field_datetime', 'click sortable' => TRUE), 'sort' => array('handler' => 'tincan_lrs_handler_sort_date'), 'filter' => array('handler' => 'tincan_lrs_handler_filter_datetime'), 'argument' => array('handler' => 'views_handler_argument_tincanlrs_fulldate'));
     return $data;
 }
예제 #3
0
 /**
  * Defines the result for hook_views_data().
  */
 public function views_data()
 {
     $data = parent::views_data();
     return $data;
 }