function manualcrop_crop_and_scale_form in Manual Crop 7
Form builder; Configuration settings for the crop and scale effect.
Parameters
$data: The current configuration for this crop and scale effect.
Return value
The form structure array.
1 string reference to 'manualcrop_crop_and_scale_form'
- manualcrop_image_effect_info in ./
manualcrop.module - Implements hook_image_effect_info().
File
- ./
manualcrop.admin.inc, line 51 - Admin functionality for the Manual Crop module.
Code
function manualcrop_crop_and_scale_form($data) {
$form = image_scale_form($data);
$form['width']['#required'] = TRUE;
$form['height']['#required'] = TRUE;
$form['respectminimum'] = array(
'#type' => 'checkbox',
'#title' => t('Respect minimum'),
'#description' => t("Make sure the selected crop area is at least as big as the destination size. This doesn't enforce minimum image dimensions."),
'#default_value' => isset($data['respectminimum']) ? $data['respectminimum'] : TRUE,
);
$form['onlyscaleifcrop'] = array(
'#type' => 'checkbox',
'#title' => t('Only scale if cropped'),
'#description' => t('Only scale the image if it was manually cropped.'),
'#default_value' => isset($data['onlyscaleifcrop']) ? $data['onlyscaleifcrop'] : FALSE,
);
return $form;
}