1 date_views_plugin_pager.inc public date_views_plugin_pager::date_forbid($argument)

Custom callback evaluating the date range.

Add a callback to determine if we have moved outside the valid date range for this views argument.

File

core/modules/date/views/date_views_plugin_pager.inc, line 347
Date views pager plugin.

Class

date_views_plugin_pager
Date views pager plugin.

Code

public function date_forbid($argument) {
  // See if we're outside the allowed date range for our argument.
  $limit = date_range_years($argument->options['year_range']);
  if (date_format($argument->min_date, 'Y') < $limit[0] || date_format($argument->max_date, 'Y') > $limit[1]) {
    return TRUE;
  }
  return FALSE;
}