You are here

public function views_handler_argument::option_definition in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_argument.inc \views_handler_argument::option_definition()
  2. 6.2 handlers/views_handler_argument.inc \views_handler_argument::option_definition()

Information about options for all kinds of purposes will be held here.

@code 'option_name' => array(

  • 'default' => default value,
  • 'translatable' => (optional) TRUE/FALSE (wrap in t() on export if true),
  • 'contains' => (optional) array of items this contains, with its own defaults, etc. If contains is set, the default will be ignored and assumed to be array().
  • 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will change the export format to TRUE/FALSE instead of 1/0.
  • 'export' => (optional) FALSE or a callback for special export handling if necessary.
  • 'unpack_translatable' => (optional) callback for special handling for translating data within the option, if necessary.

),

Return value

array Returns the options of this handler/plugin.

Overrides views_handler::option_definition

See also

views_object::export_option()

views_object::export_option_always()

views_object::unpack_translatable()

6 calls to views_handler_argument::option_definition()
views_handler_argument_many_to_one::option_definition in handlers/views_handler_argument_many_to_one.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_null::option_definition in handlers/views_handler_argument_null.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_numeric::option_definition in handlers/views_handler_argument_numeric.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_string::option_definition in handlers/views_handler_argument_string.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_term_node_tid_depth::option_definition in modules/taxonomy/views_handler_argument_term_node_tid_depth.inc
Information about options for all kinds of purposes will be held here.

... See full list

6 methods override views_handler_argument::option_definition()
views_handler_argument_many_to_one::option_definition in handlers/views_handler_argument_many_to_one.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_null::option_definition in handlers/views_handler_argument_null.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_numeric::option_definition in handlers/views_handler_argument_numeric.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_string::option_definition in handlers/views_handler_argument_string.inc
Information about options for all kinds of purposes will be held here.
views_handler_argument_term_node_tid_depth::option_definition in modules/taxonomy/views_handler_argument_term_node_tid_depth.inc
Information about options for all kinds of purposes will be held here.

... See full list

File

handlers/views_handler_argument.inc, line 210
Definition of views_handler_argument.

Class

views_handler_argument
Base class for arguments.

Code

public function option_definition() {
  $options = parent::option_definition();
  $options['default_action'] = array(
    'default' => 'ignore',
  );
  $options['exception'] = array(
    'contains' => array(
      'value' => array(
        'default' => 'all',
      ),
      'title_enable' => array(
        'default' => FALSE,
        'bool' => TRUE,
      ),
      'title' => array(
        'default' => 'All',
        'translatable' => TRUE,
      ),
    ),
  );
  $options['title_enable'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['title'] = array(
    'default' => '',
    'translatable' => TRUE,
  );
  $options['breadcrumb_enable'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['breadcrumb'] = array(
    'default' => '',
    'translatable' => TRUE,
  );
  $options['default_argument_type'] = array(
    'default' => 'fixed',
    'export' => 'export_plugin',
  );
  $options['default_argument_options'] = array(
    'default' => array(),
    'export' => FALSE,
  );
  $options['default_argument_skip_url'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['summary_options'] = array(
    'default' => array(),
    'export' => FALSE,
  );
  $options['summary'] = array(
    'contains' => array(
      'sort_order' => array(
        'default' => 'asc',
      ),
      'number_of_records' => array(
        'default' => 0,
      ),
      'format' => array(
        'default' => 'default_summary',
        'export' => 'export_summary',
      ),
    ),
  );
  $options['specify_validation'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['validate'] = array(
    'contains' => array(
      'type' => array(
        'default' => 'none',
        'export' => 'export_validation',
      ),
      'fail' => array(
        'default' => 'not found',
      ),
    ),
  );
  $options['validate_options'] = array(
    'default' => array(),
    'export' => FALSE,
  );
  return $options;
}