function simplecrop_field_widget_info in SimpleCrop 7
Implements hook_field_widget_info().
File
- includes/
simplecrop.field.inc, line 11 - Contains information about field widget and related functions.
Code
function simplecrop_field_widget_info() {
return array(
'simplecrop_widget' => array(
'label' => t('SimpleCrop'),
'field types' => array(
'image',
),
'settings' => array(
// Keep the default image settings.
'progress_indicator' => 'throbber',
'preview_image_style' => FALSE,
// Simplecrop settings.
'simplecrop' => array(
'upload_display' => SIMPLECROP_DISPLAY_ORIGINAL_IMAGE,
'initial_display' => SIMPLECROP_DISPLAY_CROPPED_IMAGE,
'hide_filename' => TRUE,
'source' => array(
'scale' => array(
'width' => 350,
'height' => 350,
),
),
'cropped' => array(
'scale' => array(
'width' => 100,
'height' => 100,
),
),
'crop' => array(
'ratio' => array(
'width' => '',
'height' => '',
),
'min_area' => array(
'width' => '',
'height' => '',
),
'max_area' => array(
'width' => '',
'height' => '',
),
'initial_area' => SIMPLECROP_CROP_AREA_MAXIMIZE,
),
),
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_CUSTOM,
'default value' => FIELD_BEHAVIOR_NONE,
),
),
);
}