1 views_handler_field_user_picture.inc views_handler_field_user_picture::options_form(&$form, &$form_state)

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

Overrides views_handler_field::options_form


core/modules/user/views/views_handler_field_user_picture.inc, line 49
Definition of views_handler_field_user_picture.


Field handler to provide simple renderer that allows using a themed user link.


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'],