function image_crop_form
image_crop_form($data)
Form structure for the image crop form.
Note that this is not a complete form, it only contains the portion of the form for configuring the crop options. Therefore it does not not need to include metadata about the effect, nor a submit button.
Parameters
$data: The current configuration for this crop effect.
File
- modules/image/image.admin.inc, line 583
- Administration pages for image settings.
Code
function image_crop_form($data) { $data += array( 'width' => '', 'height' => '', 'anchor' => 'center-center', ); $form = image_resize_form($data); $form['anchor'] = array( '#type' => 'radios', '#title' => t('Anchor'), '#options' => array( 'left-top' => t('Top left'), 'center-top' => t('Top center'), 'right-top' => t('Top right'), 'left-center' => t('Center left'), 'center-center' => t('Center'), 'right-center' => t('Center right'), 'left-bottom' => t('Bottom left'), 'center-bottom' => t('Bottom center'), 'right-bottom' => t('Bottom right'), ), '#theme' => 'image_anchor', '#default_value' => $data['anchor'], '#description' => t('The part of the image that will be retained during the crop.'), ); return $form; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.admin.inc/function/image_crop_form/7.x