function image_field_info

Implements hook_field_info().

File

drupal/core/modules/image/image.field.inc, line 14
Implement an image field, based on the file module's file field.

Code

function image_field_info() {
  return array(
    'image' => array(
      'label' => t('Image'),
      'description' => t('This field stores the ID of an image file as an integer value.'),
      'settings' => array(
        'uri_scheme' => file_default_scheme(),
        'default_image' => 0,
        'column_groups' => array(
          'file' => array(
            'label' => t('File'),
            'columns' => array(
              'fid',
              'width',
              'height',
            ),
          ),
          'alt' => array(
            'label' => t('Alt'),
            'translatable' => TRUE,
          ),
          'title' => array(
            'label' => t('Title'),
            'translatable' => TRUE,
          ),
        ),
      ),
      'instance_settings' => array(
        'file_extensions' => 'png gif jpg jpeg',
        'file_directory' => '',
        'max_filesize' => '',
        'alt_field' => 0,
        'alt_field_required' => 0,
        'title_field' => 0,
        'title_field_required' => 0,
        'max_resolution' => '',
        'min_resolution' => '',
        'default_image' => 0,
      ),
      'default_widget' => 'image_image',
      'default_formatter' => 'image',
      'field item class' => '\\Drupal\\image\\Type\\ImageItem',
    ),
  );
}