You are here

public function state_flow_entity_handler_field_state_flow_states::option_definition in State Machine 7.3

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_field::option_definition

See also

views_object::export_option()

views_object::export_option_always()

views_object::unpack_translatable()

2 calls to state_flow_entity_handler_field_state_flow_states::option_definition()
state_flow_entity_handler_field_link::option_definition in modules/state_flow_entity/includes/views/state_flow_entity_handler_field_link.inc
Information about options for all kinds of purposes will be held here.
state_flow_entity_handler_field_state_flow_states::options_form in modules/state_flow_entity/includes/views/state_flow_entity_handler_field_state_flow_states.inc
Default options form provides the label widget that all fields should have.
1 method overrides state_flow_entity_handler_field_state_flow_states::option_definition()
state_flow_entity_handler_field_link::option_definition in modules/state_flow_entity/includes/views/state_flow_entity_handler_field_link.inc
Information about options for all kinds of purposes will be held here.

File

modules/state_flow_entity/includes/views/state_flow_entity_handler_field_state_flow_states.inc, line 25
A helper class that is extended by state_flow_entity_handler_field_link and state_flow_entity_handler_field_events_form.

Class

state_flow_entity_handler_field_state_flow_states
@file A helper class that is extended by state_flow_entity_handler_field_link and state_flow_entity_handler_field_events_form.

Code

public function option_definition() {

  // @todo, do we need the parent options? A lot of the variables don't apply
  // at all.
  $options = parent::option_definition();
  $options['active_revision_handling'] = array(
    'default' => 'both',
  );

  // This option has been deprecated for active_revision_handling.
  $options['show_only_for_active_revision_ids'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  return $options;
}