You are here

function views_handler_field_content::options_form in Content Construction Kit (CCK) 6

Provide formatter option.

1 call to views_handler_field_content::options_form()
views_handler_field_content_multiple::options_form in includes/content.views.inc
Provide 'group multiple values' option.
1 method overrides views_handler_field_content::options_form()
views_handler_field_content_multiple::options_form in includes/content.views.inc
Provide 'group multiple values' option.

File

includes/content.views.inc, line 277

Class

views_handler_field_content
The subclass adds basic field and formatter info, for field-specific subclasses to use if they need to.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // TODO : do we want the 'link to node' checkbox ?
  // That's usually formatters business...
  $field = $this->content_field;
  $options = $this->options;
  $field_types = _content_field_types();
  $formatters = array();
  if (is_array($field_types[$field['type']]['formatters'])) {
    foreach ($field_types[$field['type']]['formatters'] as $name => $info) {
      $formatters[$name] = t($info['label']);
    }
  }
  $form['format'] = array(
    '#title' => t('Format'),
    '#type' => 'select',
    '#options' => $formatters,
    '#required' => TRUE,
    '#default_value' => $options['format'],
  );
}