You are here

function content_field_type_options in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 includes/content.admin.inc \content_field_type_options()

Return an array of field_type options.

2 calls to content_field_type_options()
content_field_basic_form in includes/content.admin.inc
A form element for selecting field, widget, and label.
content_field_overview_form in includes/content.admin.inc
Menu callback; listing of fields for a content type.

File

includes/content.admin.inc, line 720
Administrative interface for content type creation.

Code

function content_field_type_options() {
  static $options;
  if (!isset($options)) {
    $options = array();
    $field_types = _content_field_types();
    $field_type_options = array();
    foreach ($field_types as $field_type_name => $field_type) {

      // skip field types which have no widget types.
      if (content_widget_type_options($field_type_name)) {
        $options[$field_type_name] = t($field_type['label']);
      }
    }
    asort($options);
  }
  return $options;
}