function views_handler_relationship::option_definition

3.x views_handler_relationship.inc views_handler_relationship::option_definition()
2.x views_handler_relationship.inc views_handler_relationship::option_definition()

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

'option_name' => array(
 - 'default' => default value,
 - 'translatable' => TRUE/FALSE (wrap in t() on export if true),
 - 'contains' => array of items this contains, with its own defaults, etc.
     If contains is set, the default will be ignored and assumed to
     be array()

 ),
 

Each option may have any of the following functions:

  • export_option_OPTIONNAME -- Special export handling if necessary.
  • translate_option_OPTIONNAME -- Special handling for translating data within the option, if necessary.

Overrides views_object::option_definition

2 calls to views_handler_relationship::option_definition()
views_handler_relationship_node_term_data::option_definition in modules/taxonomy/views_handler_relationship_node_term_data.inc
Information about options for all kinds of purposes will be held here.
views_handler_relationship_translation::option_definition in modules/translation/views_handler_relationship_translation.inc
Information about options for all kinds of purposes will be held here.
2 methods override views_handler_relationship::option_definition()
views_handler_relationship_node_term_data::option_definition in modules/taxonomy/views_handler_relationship_node_term_data.inc
Information about options for all kinds of purposes will be held here.
views_handler_relationship_translation::option_definition in modules/translation/views_handler_relationship_translation.inc
Information about options for all kinds of purposes will be held here.

File

handlers/views_handler_relationship.inc, line 60
Views' relationship handlers.

Class

views_handler_relationship
Simple relationship handler that allows a new version of the primary table to be linked in.

Code

function option_definition() {
  $options = parent::option_definition();

  $label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
  $options['label'] = array('default' => $label, 'translatable' => TRUE);
  $options['required'] = array('default' => FALSE);

  return $options;
}