You are here

public function state_flow_entity_handler_area_events_form::options_form in State Machine 7.3

Default options form.

Provides the label widget that all fields should have.

Overrides views_handler_area_text::options_form

File

modules/state_flow_entity/includes/views/state_flow_entity_handler_area_events_form.inc, line 31
Contains state_flow_entity_handler_area_events_form

Class

state_flow_entity_handler_area_events_form
Views area handlers. Insert a state flow entity form in a view.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  unset($form['content']);
  $form['entity_id'] = array(
    '#title' => 'Entity ID',
    '#description' => 'For what entity id should this form be rendered? For most usages, this will be a node id that is coming in to the View as an argument. If this is the case, use token replacement.',
    '#type' => 'textfield',
    '#default_value' => $this->options['entity_id'],
  );

  // @todo, remove hard-coded node expectation.
  $form['entity_type'] = array(
    '#title' => 'Entity Type',
    '#type' => 'value',
    '#value' => 'node',
    '#default_value' => $this->options['entity_type'],
  );
  $form['entity_to_use'] = array(
    '#type' => 'select',
    '#title' => t('Entity to use'),
    '#options' => array(
      'active' => 'Active',
      'default' => 'Default',
    ),
    '#default_value' => $this->options['entity_to_use'],
    '#description' => t('The active entity is the one that most recently has had a state change or edit. This may or may not be the entity that loads from entity_load(). "Active" is recommended for most usages.'),
  );
}