You are here

function faqfield_field_info in FAQ Field 7

Implements hook_field_info().

Provides the description of the field.

File

./faqfield.module, line 31
FAQ Field Provides a field for frequently asked questions.

Code

function faqfield_field_info() {
  return array(
    'faqfield' => array(
      'label' => t('FAQ Field'),
      'description' => t('Field for frequently asked questions.'),
      'default_widget' => 'faqfield_textboxes',
      'default_formatter' => 'faqfield_accordion',
      // Set the default field settings.
      'settings' => array(
        'answer_widget' => 'textarea',
        'format' => 0,
        'advanced' => array(
          'question_title' => t('Question'),
          'question_length' => 255,
          'question_rows' => 1,
          'answer_title' => t('Answer'),
          'answer_rows' => 3,
        ),
      ),
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'faqfield',
      'property_callbacks' => array(
        'faqfield_property_info_callback',
      ),
    ),
  );
}