You are here

function views_plugin_style_atom_delete::options_form in Views Atom 7

Same name and namespace in other branches
  1. 6 views/views_plugin_style_atom_delete.inc \views_plugin_style_atom_delete::options_form()

Provide a form for setting options.

Overrides views_plugin_style::options_form

File

./views_plugin_style_atom_delete.inc, line 33
Style plugin for an Atom feed using the Tombstone specification for entry deletion.

Class

views_plugin_style_atom_delete
@file Style plugin for an Atom feed using the Tombstone specification for entry deletion.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = parent::option_definition();
  if (module_exists('feeds')) {
    $form['guid'] = array(
      '#type' => 'fieldset',
      '#title' => t('GUID settings'),
      '#description' => t('Controls how the GUID is created.'),
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
    );
    $form['guid']['use_existing_from_feed'] = array(
      '#title' => t('Use existing GUID when available'),
      '#type' => 'checkbox',
      '#default_value' => !empty($this->options['guid']['use_existing_from_feed']),
      '#description' => t('If the node was imported into the site from another feed, use the original GUID.'),
    );
  }
  $form['guid']['#access'] = count(element_children($form['guid'])) ? TRUE : FALSE;
}