You are here

function views_handler_field_amazon_title::options_form in Amazon Product Advertisement API 6

Same name in this branch
  1. 6 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::options_form()
  2. 6 includes/views_handler_filter_amazon_node_module.inc \views_handler_field_amazon_title::options_form()
Same name and namespace in other branches
  1. 7.2 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::options_form()
  2. 7 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::options_form()

Provide link to node option

File

includes/views_handler_filter_amazon_node_module.inc, line 45

Class

views_handler_field_amazon_title

Code

function options_form(&$form, &$form_state) {
  $form['link_format'] = array(
    '#title' => t('Link behavior'),
    '#type' => 'radios',
    '#options' => array(
      'plain' => t('No link'),
      'amazon' => t("A link to the product's Amazon page"),
    ),
    '#default_value' => !empty($this->options['link_format']) ? $this->options['link_format'] : 'plain',
  );
  if ($this->view->base_table == 'node') {
    $form['link_format']['#options']['node'] = t('A link to the node the product is associated with');
  }
}