You are here

class _datex_date_views_argument_handler_simple in Datex 7.3

Copied from date_views module. So we have no hard dependency on it.

Hierarchy

Expanded class hierarchy of _datex_date_views_argument_handler_simple

1 string reference to '_datex_date_views_argument_handler_simple'
datex_views_data_alter in ./datex.module
Implements hook_views_data_alter().

File

./datex.views.inc, line 441
Datex views integration.

View source
class _datex_date_views_argument_handler_simple extends views_handler_argument_date {

  /**
   * Handle the date and convert it accordingly.
   */
  function _datex() {
    if (isset($this->datexed)) {
      return;
    }
    $this->datexed = TRUE;
    $schema = _datex_element_schema($this->options);
    if ($schema === 'disabled') {
      return;
    }
    $calendar = datex_factory(NULL, _datex_language_calendar_name($schema));
    if (!$calendar) {
      return;
    }
    $gr = $this->options['granularity'];
    $arg = str_replace('-', '', $this->argument);
    switch ($gr) {
      case 'year':
        $calendar
          ->setDateLocale($arg, 6, 24);
        $this->argument = $calendar
          ->xFormat('Y');
        break;
      case 'month':
        if (strlen($arg) < 5) {
          return;
        }
        $calendar
          ->setDateLocale(substr($arg, 0, 4), substr($arg, 4, 6), 24);
        $this->argument = $calendar
          ->xFormat('Y-m');
        break;
      case 'day':
        if (strlen($arg) < 7) {
          return;
        }
        $calendar
          ->setDateLocale(substr($arg, 0, 4), substr($arg, 4, 6), substr($argc, 6, 8));
        $this->argument = $calendar
          ->xFormat('Y-m-d');
        break;
    }
  }

  /**
   * Fix the query for localized dates.
   */
  function query($group_by = FALSE) {
    try {
      $this
        ->_datex();
    } catch (Exception $ignore) {
    }
    return $this
      ->_query($group_by);
  }

  /**
   * Default value for the date_fields option.
   */
  function option_definition() {
    $options = $this
      ->_option_definition();
    $options['datex_schema'] = [
      'default' => 'default',
    ];
    return $options;
  }

  /**
   * Schema to use for the displayed date.
   */
  function options_form(&$form, &$form_state) {
    $this
      ->_options_form($form, $form_state);
    $form['datex_schema'] = [
      '#title' => t('Datex Schema'),
      '#type' => 'select',
      '#options' => _datex_schema_form_options(),
      '#default_value' => $this->options['datex_schema'],
    ];
  }

  // -----------------------------------------------------------

  /**
   * Get granularity.
   *
   * Use it to create the formula and a format for the results.
   */
  function init(&$view, &$options) {
    parent::init($view, $options);

    // Add a date handler.
    module_load_include('inc', 'date_api', 'date_api_sql');
    $this->date_handler = new date_sql_handler(DATE_UNIX);
    if (!empty($this->definition['field_name'])) {
      $field = field_info_field($this->definition['field_name']);
      if (!empty($field) && !empty($field['type'])) {
        $this->date_handler->date_type = $field['type'];
        $this->original_table = $this->definition['table'];
      }
      $this->date_handler->db_timezone = date_get_timezone_db($field['settings']['tz_handling']);
      $this->date_handler->local_timezone = date_get_timezone($field['settings']['tz_handling']);
    }
    $this->date_handler->granularity = $this->options['granularity'];

    // This value needs to be initialized so
    // it exists even if the query doesn't run.
    $this->date_handler->placeholders = [];
    $this->format = $this->date_handler
      ->views_formats($this->date_handler->granularity, 'display');
    $this->sql_format = $this->date_handler
      ->views_formats($this->date_handler->granularity, 'sql');

    // $this->arg_format is the format the parent date
    // handler will use to create a default argument.
    $this->arg_format = $this
      ->format();

    // Identify the base table for this field.
    // It will be used to call for the right query field options.
    $this->base_table = $this->table;
  }

  /**
   * {@inheritdoc}
   */
  function format() {
    if (!empty($this->options['granularity'])) {
      return $this->date_handler
        ->views_formats($this->options['granularity']);
    }
    else {
      return !empty($this->options[$this->option_name]) ? $this->options[$this->option_name] : 'Y-m';
    }
  }

  /**
   * Set the empty argument value to the current date.
   *
   * Formatted appropriately for this argument.
   */
  function get_default_argument($raw = FALSE) {
    $is_default = FALSE;
    if (!$raw && $this->options['default_argument_type'] == 'date') {
      $granularity = $this->options['granularity'];
      if ($granularity == 'week') {
        $now = date_now();
        $week = date_week(date_format($now, 'Y-m-d'));
        $value = date_format($now, 'o') . '-W' . date_pad($week);
      }
      else {
        $value = date($this->arg_format, REQUEST_TIME);
      }
      drupal_alter('date_default_argument', $this, $value);
      return $value;
    }

    // Let the parent argument handle options like node created date.
    return parent::get_default_argument($raw);
  }

  /**
   * Default value for the date_fields option.
   */
  function _option_definition() {
    $options = parent::option_definition();
    $options['year_range'] = [
      'default' => '-3:+3',
    ];
    $options['granularity'] = [
      'default' => 'month',
    ];
    $options['granularity_reset'] = [
      'default' => FALSE,
    ];
    $options['default_argument_type']['default'] = 'date';
    $options['add_delta'] = [
      'default' => '',
    ];
    $options['use_fromto'] = [
      'default' => '',
    ];
    $options['title_format'] = [
      'default' => '',
    ];
    $options['title_format_custom'] = [
      'default' => '',
    ];
    return $options;
  }

  /**
   * Add a form element to select date_fields for this argument.
   */
  function _options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);

    // Add an option to control the format of the summary.
    $options = [
      '' => t('Default format'),
      'custom' => t('Custom format'),
    ];
    $example_month = date_format_date(date_example_date(), 'custom', $this->date_handler
      ->views_formats('month', 'display'));
    $example_day = date_format_date(date_example_date(), 'custom', $this->date_handler
      ->views_formats('day', 'display'));
    $form['title_format'] = [
      '#type' => 'select',
      '#title' => t('Date format options'),
      '#default_value' => $this->options['title_format'],
      '#options' => $options,
      '#description' => t('The date format used in titles and summary links for this argument. The default format is based on the granularity of the filter, i.e. month: @example_month, day: @example_day.', [
        '@example_month' => $example_month,
        '@example_day' => $example_day,
      ]),
      '#attributes' => [
        'class' => [
          'dependent-options',
        ],
      ],
      '#states' => [
        'visible' => [
          ':input[name="options[default_action]"]' => [
            'value' => 'summary',
          ],
        ],
      ],
    ];
    $form['title_format_custom'] = [
      '#type' => 'textfield',
      '#title' => t('Custom summary date format'),
      '#default_value' => $this->options['title_format_custom'],
      '#description' => t("A custom format for the title and summary date format. Define a php date format string like 'm-d-Y H:i' (see <a href=\"@link\">http://php.net/date</a> for more details).", [
        '@link' => 'http://php.net/date',
      ]),
      '#attributes' => [
        'class' => [
          'dependent-options',
        ],
      ],
      '#states' => [
        'visible' => [
          ':input[name="options[title_format]"]' => [
            'value' => 'custom',
          ],
        ],
      ],
    ];

    // Get default granularity options
    $options = $this->date_handler
      ->date_parts();

    // Add the 'week' option.
    $options += [
      'week' => t('Week', [], [
        'context' => 'datetime',
      ]),
    ];
    $form['granularity'] = [
      '#title' => t('Granularity'),
      '#type' => 'radios',
      '#options' => $options,
      '#default_value' => $this->options['granularity'],
      '#description' => t("Select the type of date value to be used in defaults, summaries, and navigation. For example, a granularity of 'month' will set the default date to the current month, summarize by month in summary views, and link to the next and previous month when using date navigation."),
    ];
    $form['granularity_reset'] = [
      '#title' => t('Use granularity from argument value'),
      '#type' => 'checkbox',
      '#default_value' => $this->options['granularity_reset'],
      '#description' => t("If the granularity of argument value is different from selected, use it from argument value."),
    ];
    $form['year_range'] = [
      '#title' => t('Date year range'),
      '#type' => 'textfield',
      '#default_value' => $this->options['year_range'],
      '#description' => t("Set the allowable minimum and maximum year range for this argument, either a -X:+X offset from the current year, like '-3:+3' or an absolute minimum and maximum year, like '2005:2010' . When the argument is set to a date outside the range, the page will be returned as 'Page not found (404)' ."),
    ];
    $form['use_fromto'] = [
      '#type' => 'radios',
      '#title' => t('Dates to compare'),
      '#default_value' => $this->options['use_fromto'],
      '#options' => [
        '' => t('Start/End date range'),
        'no' => t('Only this field'),
      ],
      '#description' => t("If selected the view will check if any value starting with the 'Start' date and ending with the 'End' date matches the view criteria. Otherwise the view will be limited to the specifically selected fields. Comparing to the whole Start/End range is the recommended setting when using this filter in a Calendar. When using the Start/End option, it is not necessary to add both the Start and End fields to the filter, either one will do."),
    ];
    $access = TRUE;
    if (!empty($this->definition['field_name'])) {
      $field = field_info_field($this->definition['field_name']);
      $access = $field['cardinality'] != 1;
    }
    $form['add_delta'] = [
      '#type' => 'radios',
      '#title' => t('Add multiple value identifier'),
      '#default_value' => $this->options['add_delta'],
      '#options' => [
        '' => t('No'),
        'yes' => t('Yes'),
      ],
      '#description' => t('Add an identifier to the view to show which multiple value date fields meet the filter criteria. Note: This option may introduce duplicate values into the view. Required when using multiple value fields in a Calendar or any time you want the node view of multiple value dates to display only the values that match the view filters.'),
      // Only let mere mortals tweak this setting for multi-value fields.
      '#access' => $access,
    ];
  }

  /**
   * {@inheritdoc}
   */
  function options_validate(&$form, &$form_state) {

    // It is very important to call the parent function here:
    parent::options_validate($form, $form_state);
    if (!preg_match('/^(?:\\-[0-9]{1,4}|[0-9]{4}):(?:[\\+\\-][0-9]{1,4}|[0-9]{4})$/', $form_state['values']['options']['year_range'])) {
      form_error($form['year_range'], t('Date year range must be in the format -9:+9, 2005:2010, -9:2010, or 2005:+9'));
    }
  }

  /**
   * Provide a link to the next level of the view from the summary.
   */
  function summary_name($data) {
    $value = $data->{$this->name_alias};
    if (empty($value) && !empty($this->definition['empty field name'])) {
      return $this->definition['empty field name'];
    }
    elseif (empty($value)) {
      return $this->options['wildcard_substitution'];
    }
    $format = !empty($this->options['title_format_custom']) && !empty($this->options['title_format_custom']) ? $this->options['title_format_custom'] : $this->date_handler
      ->views_formats($this->options['granularity'], 'display');
    $range = $this->date_handler
      ->arg_range($value);
    return date_format_date($range[0], 'custom', $format);
  }

  /**
   * Provide a title for the view based on the argument value.
   */
  function title() {
    $format = !empty($this->options['title_format_custom']) && !empty($this->options['title_format_custom']) ? $this->options['title_format_custom'] : $this->date_handler
      ->views_formats($this->options['granularity'], 'display');
    $range = $this->date_handler
      ->arg_range($this->argument);
    return date_format_date($range[0], 'custom', $format);
  }

  /**
   * Provide the argument to use to link from the summary to the next level.
   *
   * This will be called once per row of a summary, and used as part of
   * $view->get_url().
   *
   * @param object $data
   *   The query results for the row.
   */
  function summary_argument($data) {
    $format = $this->date_handler
      ->views_formats($this->options['granularity'], 'sql');
    $value = $data->{$this->name_alias};
    if (empty($value)) {
      return $this->options['exception']['value'];
    }
    $range = $this->date_handler
      ->arg_range($value);
    return date_format_date($range[0], 'custom', $format);
  }

  /**
   * Inject a test for valid date range before the summary query.
   */
  function summary_query() {

    // @TODO The summary values are computed by the database.
    // Unless the database has built-in timezone handling it will use
    // a fixed offset, which will not be right for all dates.
    // The only way I can see to make this work right is to store the offset
    // for each date in the database so it can be added to the base
    // date value before the database formats the result. Because this is a huge
    // architectural change, it won't go in until we start a new branch.
    $this->formula = $this->date_handler
      ->sql_format($this->sql_format, $this->date_handler
      ->sql_field("***table***.{$this->real_field}"));
    $this
      ->ensure_my_table();

    // Now that our table is secure, get our formula.
    $formula = $this
      ->get_formula();

    // Add the field, give it an alias that does NOT match the actual
    // field name or grouping won't work right.
    $this->base_alias = $this->name_alias = $this->query
      ->add_field(NULL, $formula, $this->field . '_summary');
    $this->query
      ->set_count_field(NULL, $formula, $this->field);
    return $this
      ->summary_basics(FALSE);
  }

  /**
   * Inject a test for valid date range before the regular query.
   *
   * Override the parent query to be able to control the $group.
   */
  function _query($group_by = FALSE) {

    // @TODO Not doing anything with $group_by yet,
    // need to figure out what has to be done.
    if ($this
      ->date_forbid()) {
      return;
    }

    // See if we need to reset granularity based on an argument value.
    // Make sure we don't try to reset to some bogus value if someone has
    // typed in an unexpected argument.
    if ($this->options['granularity_reset'] && ($granularity = $this->date_handler
      ->arg_granularity($this->argument))) {
      $this->date_handler->granularity = $granularity;
      $this->format = $this->date_handler
        ->views_formats($this->date_handler->granularity, 'display');
      $this->sql_format = $this->date_handler
        ->views_formats($this->date_handler->granularity, 'sql');
    }
    $this->granularity = $this->date_handler->granularity;
    $this
      ->ensure_my_table();
    $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;

    // If requested, add the delta field to the view so
    // we can later find the value that matched our query.
    if (!empty($this->options['add_delta']) && (substr($this->real_field, -6) == '_value' || substr($this->real_field, -7) == '_value2')) {
      $this->query
        ->add_field($this->table_alias, 'delta');
      $real_field_name = str_replace([
        '_value',
        '_value2',
      ], '', $this->real_field);
      $this->query
        ->add_field($this->table_alias, 'entity_id', 'date_id_' . $real_field_name);
      $this->query
        ->add_field($this->table_alias, 'delta', 'date_delta_' . $real_field_name);
    }
    $format = $this->date_handler->granularity == 'week' ? DATE_FORMAT_DATETIME : $this->sql_format;
    $view_min = date_format($this->min_date, $format);
    $view_max = date_format($this->max_date, $format);
    $view_min_placeholder = $this
      ->placeholder();
    $view_max_placeholder = $this
      ->placeholder();
    $this->date_handler->placeholders = [
      $view_min_placeholder => $view_min,
      $view_max_placeholder => $view_max,
    ];

    // Are we comparing this field only or the Start/End date range
    // to the view criteria?
    if (!empty($this->options['use_fromto'])) {

      // The simple case, match the field to the view range.
      $field = $this->date_handler
        ->sql_field($this->table_alias . '.' . $this->real_field, NULL, $this->min_date);
      $field = $this->date_handler
        ->sql_format($format, $field);
      $this->query
        ->add_where_expression($group, "{$field} >= {$view_min_placeholder} AND {$field} <= {$view_max_placeholder}", [
        $view_min_placeholder => $view_min,
        $view_max_placeholder => $view_max,
      ]);
    }
    else {

      // Look for the intersection of the range
      // of the date field with the range of the view.
      // Get the Start/End values for this field.
      // Retrieve using the original table name.
      // Swap the current table name (adjusted for relationships)
      // into the query.
      // @TODO We may be able to use Views substitutions here,
      // investigate that later.
      $fields = date_views_fields($this->base_table);
      $fields = $fields['name'];
      $fromto = $fields[$this->original_table . '.' . $this->real_field]['fromto'];
      $value_min = str_replace($this->original_table, $this->table_alias, $fromto[0]);
      $value_max = str_replace($this->original_table, $this->table_alias, $fromto[1]);
      $field_min = $this->date_handler
        ->sql_field($value_min, NULL, $this->min_date);
      $field_min = $this->date_handler
        ->sql_format($format, $field_min);
      $field_max = $this->date_handler
        ->sql_field($value_max, NULL, $this->max_date);
      $field_max = $this->date_handler
        ->sql_format($format, $field_max);
      $this->query
        ->add_where_expression($group, "{$field_max} >= {$view_min_placeholder} AND {$field_min} <= {$view_max_placeholder}", [
        $view_min_placeholder => $view_min,
        $view_max_placeholder => $view_max,
      ]);
    }
  }

  /**
   * Add a callback.
   *
   * To determine if we have moved outside
   * the valid date range for this argument.
   */
  function date_forbid() {
    if (empty($this->argument)) {
      return TRUE;
    }
    $this->date_range = $this->date_handler
      ->arg_range($this->argument);
    $this->min_date = $this->date_range[0];
    $this->max_date = $this->date_range[1];
    $this->limit = date_range_years($this->options['year_range']);
    $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;

    // See if we're outside the allowed date range for our argument.
    if (date_format($this->min_date, 'Y') < $this->limit[0] || date_format($this->max_date, 'Y') > $this->limit[1]) {
      $this->forbid = TRUE;
      $this->view->build_info['fail'] = TRUE;
      return TRUE;
    }
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
views_handler::$handler_type public property The type of the handler, for example filter/footer/field.
views_handler::$query public property Where the $query object will reside:. 1
views_handler::$real_field public property The actual field in the database table, maybe different on other kind of query plugins/special handlers.
views_handler::$relationship public property The relationship used for this field.
views_handler::$table_alias public property The alias of the table of this handler which is used in the query.
views_handler::$view public property The top object of a view. Overrides views_object::$view
views_handler::accept_exposed_input public function Take input from exposed handlers and assign to this handler, if necessary. 1
views_handler::access public function Check whether current user has access to this handler. 10
views_handler::admin_summary public function Provide text for the administrative summary. 4
views_handler::broken public function Determine if the handler is considered 'broken'. 6
views_handler::can_expose public function Determine if a handler can be exposed. 2
views_handler::case_transform public function Transform a string by a certain method.
views_handler::ensure_my_table public function Ensure the main table for this handler is in the query. This is used a lot. 8
views_handler::exposed_form public function Render our chunk of the exposed handler form when selecting. 1
views_handler::exposed_info public function Get information about the exposed form for the form renderer. 1
views_handler::exposed_submit public function Submit the exposed handler form.
views_handler::exposed_validate public function Validate the exposed handler form. 4
views_handler::expose_form public function Form for exposed handler options. 2
views_handler::expose_options public function Set new exposed option defaults when exposed setting is flipped on. 2
views_handler::expose_submit public function Perform any necessary changes to the form exposes prior to storage. There is no need for this function to actually store the data.
views_handler::expose_validate public function Validate the options form. 1
views_handler::extra_options public function Provide defaults for the handler.
views_handler::extra_options_form public function Provide a form for setting options. 1
views_handler::extra_options_submit public function Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.
views_handler::extra_options_validate public function Validate the options form.
views_handler::get_field public function Shortcut to get a handler's raw field value.
views_handler::get_join public function Get the join object that should be used for this handler.
views_handler::groupby_form public function Provide a form for aggregation settings. 1
views_handler::groupby_form_submit public function Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data. 1
views_handler::has_extra_options public function If a handler has 'extra options' it will get a little settings widget and another form called extra_options. 1
views_handler::is_a_group public function Returns TRUE if the exposed filter works like a grouped filter. 1
views_handler::is_exposed public function Determine if this item is 'exposed', meaning it provides form elements to let users modify the view.
views_handler::multiple_exposed_input public function Define if the exposed input has to be submitted multiple times. This is TRUE when exposed filters grouped are using checkboxes as widgets. 1
views_handler::placeholder public function Provides a unique placeholders for handlers.
views_handler::post_execute public function Run after the view is executed, before the result is cached. 1
views_handler::pre_query public function Run before the view is built. 1
views_handler::sanitize_value public function Sanitize the value for output.
views_handler::set_relationship public function Called just prior to query(), this lets a handler set up any relationship it needs.
views_handler::show_expose_button public function Shortcut to display the expose/hide button. 2
views_handler::show_expose_form public function Shortcut to display the exposed options form.
views_handler::store_exposed_input public function If set to remember exposed input in the session, store it there. 1
views_handler::ui_name public function Return a string representing this handler's name in the UI. 9
views_handler::use_group_by public function Provides the handler some groupby. 2
views_handler::validate public function Validates the handler against the complete View. 1
views_handler_argument::$argument public property
views_handler_argument::$name_field public property The field to use for the name to use in the summary.
views_handler_argument::$name_table public property The table to use for the name, if not the same table as the argument.
views_handler_argument::$validator public property
views_handler_argument::$value public property 1
views_handler_argument::default_access_denied public function Default action: access denied.
views_handler_argument::default_action public function Handle the default action, which means our argument wasn't present.
views_handler_argument::default_actions public function List of default behaviors for this argument if the argument is not present. 4
views_handler_argument::default_default public function This just returns true.
views_handler_argument::default_empty public function Default action: empty.
views_handler_argument::default_ignore public function Default action: ignore.
views_handler_argument::default_not_found public function Default action: not found.
views_handler_argument::default_summary public function Default action: summary.
views_handler_argument::default_summary_form public function Form for selecting further summary options.
views_handler_argument::exception_title public function Work out which title to use.
views_handler_argument::export_summary public function Export handler for summary export.
views_handler_argument::export_validation public function Export handler for validation export.
views_handler_argument::get_plugin public function Get the display or row plugin, if it exists.
views_handler_argument::get_title public function Called by the view object to get the title.
views_handler_argument::get_value public function Get the value of this argument.
views_handler_argument::has_default_argument public function Determine if the argument is set to provide a default argument.
views_handler_argument::is_exception public function
views_handler_argument::needs_style_plugin public function Determine if the argument needs a style plugin. Overrides views_handler::needs_style_plugin
views_handler_argument::options_submit public function Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data. Overrides views_handler::options_submit
views_handler_argument::process_summary_arguments public function Process the summary arguments for display.
views_handler_argument::set_argument public function Set the input for this argument.
views_handler_argument::set_breadcrumb public function Give an argument the opportunity to modify the breadcrumb, if it wants. 3
views_handler_argument::summary_basics public function Some basic summary behavior.
views_handler_argument::summary_name_field public function Add the name field, which is the field displayed in summary queries.
views_handler_argument::summary_sort public function Sorts the summary based upon the user's selection.
views_handler_argument::uses_breadcrumb public function Determine if the argument can generate a breadcrumb.
views_handler_argument::validate_arg public function Validate that this argument works. By default, all arguments are valid.
views_handler_argument::validate_argument public function Called by the menu system to validate an argument.
views_handler_argument::validate_argument_basic public function Provide a basic argument validation. 1
views_handler_argument::validate_fail public function How to act if validation fails.
views_handler_argument_date::$arg_format public property
views_handler_argument_date::$option_name public property
views_handler_argument_date::default_argument_form public function Add an option to set the default value to the current date. Overrides views_handler_argument::default_argument_form
views_handler_argument_date::export_plugin public function Adapt the export mechanism. Overrides views_handler_argument::export_plugin
views_handler_argument_date::get_sort_name public function Return a description of how the argument would normally be sorted. Overrides views_handler_argument::get_sort_name
views_handler_argument_formula::$formula public property
views_handler_argument_formula::construct public function Views handlers use a special construct function. Overrides views_handler_argument::construct 6
views_handler_argument_formula::get_formula public function
views_object::$definition public property Handler's definition.
views_object::$options public property Except for displays, options for the object will be held here. 1
views_object::altered_option_definition function Collect this handler's option definition and alter them, ready for use.
views_object::destroy public function Destructor. 2
views_object::export_option public function 1
views_object::export_options public function
views_object::export_option_always public function Always exports the option, regardless of the default value.
views_object::options Deprecated public function Set default options on this object. 1
views_object::set_default_options public function Set default options.
views_object::set_definition public function Let the handler know what its full definition is.
views_object::unpack_options public function Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away.
views_object::unpack_translatable public function Unpack a single option definition.
views_object::unpack_translatables public function Unpacks each handler to store translatable texts.
views_object::_set_option_defaults public function
_datex_date_views_argument_handler_simple::date_forbid function Add a callback.
_datex_date_views_argument_handler_simple::format function
_datex_date_views_argument_handler_simple::get_default_argument function Set the empty argument value to the current date. Overrides views_handler_argument_date::get_default_argument
_datex_date_views_argument_handler_simple::init function Get granularity. Overrides views_handler_argument::init
_datex_date_views_argument_handler_simple::options_form function Schema to use for the displayed date. Overrides views_handler_argument::options_form
_datex_date_views_argument_handler_simple::options_validate function Validate the options form. Overrides views_handler_argument::options_validate
_datex_date_views_argument_handler_simple::option_definition function Default value for the date_fields option. Overrides views_handler_argument::option_definition
_datex_date_views_argument_handler_simple::query function Fix the query for localized dates. Overrides views_handler_argument_formula::query
_datex_date_views_argument_handler_simple::summary_argument function Provide the argument to use to link from the summary to the next level. Overrides views_handler_argument::summary_argument
_datex_date_views_argument_handler_simple::summary_name function Provide a link to the next level of the view from the summary. Overrides views_handler_argument::summary_name
_datex_date_views_argument_handler_simple::summary_query function Inject a test for valid date range before the summary query. Overrides views_handler_argument_formula::summary_query
_datex_date_views_argument_handler_simple::title function Provide a title for the view based on the argument value. Overrides views_handler_argument::title
_datex_date_views_argument_handler_simple::_datex function Handle the date and convert it accordingly.
_datex_date_views_argument_handler_simple::_options_form function Add a form element to select date_fields for this argument.
_datex_date_views_argument_handler_simple::_option_definition function Default value for the date_fields option.
_datex_date_views_argument_handler_simple::_query function Inject a test for valid date range before the regular query.