You are here

function photos_handler_field_photos_image::options_form in Album Photos 7.3

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

inc/views/handlers/photos_handler_field_photos_image.inc, line 21
Definition of photos_handler_field_photos_image.

Class

photos_handler_field_photos_image
Field handler to provide simple renderer that allows using a themed image.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['link_photo_to_album_image'] = array(
    '#title' => t("Link to image page"),
    '#description' => t("Link the image to the album image page"),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_photo_to_album_image'],
  );
  $styles = image_styles();
  $style_options = array(
    '' => t('Default'),
  );
  foreach ($styles as $style) {
    $style_options[$style['name']] = $style['name'];
  }
  $form['image_style'] = array(
    '#title' => t('Image style'),
    '#description' => t('Using <em>Default</em> will display the image fid.'),
    '#type' => 'select',
    '#options' => $style_options,
    '#default_value' => $this->options['image_style'],
  );
}