image_resize_form
function image_resize_form
image_resize_form($data)
Form structure for the image resize form.
Note that this is not a complete form, it only contains the portion of the form for configuring the resize options. Therefore it does not not need to include metadata about the effect, nor a submit button.
Parameters
$data: The current configuration for this resize effect.
File
- modules/image/image.admin.inc, line 525
- Administration pages for image settings.
Code
function image_resize_form($data) { $form['width'] = array( '#type' => 'textfield', '#title' => t('Width'), '#default_value' => isset($data['width']) ? $data['width'] : '', '#field_suffix' => ' ' . t('pixels'), '#required' => TRUE, '#size' => 10, '#element_validate' => array('image_effect_integer_validate'), '#allow_negative' => FALSE, ); $form['height'] = array( '#type' => 'textfield', '#title' => t('Height'), '#default_value' => isset($data['height']) ? $data['height'] : '', '#field_suffix' => ' ' . t('pixels'), '#required' => TRUE, '#size' => 10, '#element_validate' => array('image_effect_integer_validate'), '#allow_negative' => FALSE, ); 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_resize_form/7.x