function views_handler_field_user_picture::options_form

Overrides views_handler_field::options_form

File

modules/user/views_handler_field_user_picture.inc, line 63

Class

views_handler_field_user_picture
Field handler for a simple renderer that allows using a themed user link.

Code

public function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $form['link_photo_to_profile'] = array(
        '#title' => t("Link to user's profile"),
        '#description' => t("Link the user picture to the user's profile"),
        '#type' => 'checkbox',
        '#default_value' => $this->options['link_photo_to_profile'],
    );
    if (module_exists('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 use the site-wide image style for user pictures set in the <a href="!account-settings">Account settings</a>.', array(
                '!account-settings' => url('admin/config/people/accounts', array(
                    'fragment' => 'edit-personalization',
                )),
            )),
            '#type' => 'select',
            '#options' => $style_options,
            '#default_value' => $this->options['image_style'],
        );
    }
}