You are here

function minisite_field_info in Mini site 7

Implements hook_field_info().

File

includes/minisite.field.inc, line 11
Minisite field.

Code

function minisite_field_info() {
  return array(
    'minisite' => array(
      'label' => t('Minisite asset'),
      'description' => t('Store a reference to a minisite asset.'),
      'settings' => array(
        'uri_scheme' => variable_get('file_default_scheme', 'public'),
      ),
      'instance_settings' => array(
        'file_extensions' => 'zip',
        'minisite_extensions' => MINISITE_EXTENSIONS_WHITELIST,
        'file_directory' => MINISITE_UPLOADPATH,
        'max_filesize' => MINISITE_MAXFILESIZE,
      ),
      'default_widget' => 'file_minisite',
      'default_formatter' => 'file_default',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'field_item_file',
      'property_callbacks' => array(
        'entity_metadata_field_file_callback',
      ),
    ),
  );
}