You are here

function availability_calendars_views_data_alter in Availability Calendars 6.2

Implements hook_views_data_alter().

We don't join with the node table, we do that in a subquery, so we have to alter the node entry itself instead of providing table data ourselves by implementing hook_views_data().

File

./availability_calendars.views.inc, line 22
Views support for Availability Calendars.

Code

function availability_calendars_views_data_alter(&$views_data) {
  $views_data['node']['available'] = array(
    'title' => t('Available'),
    'help' => t('Allows to filter on availability for a given period.'),
    'argument' => array(
      'handler' => 'views_handler_argument_date',
    ),
    'filter' => array(
      'handler' => 'availability_calendars_handler_filter_availability',
    ),
  );
  return $data;
}