function UserNameFormatter::defaultSettings

Same name in other branches
  1. 9 core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::defaultSettings()
  2. 8.9.x core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::defaultSettings()
  3. 11.x core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::defaultSettings()

Overrides PluginSettingsBase::defaultSettings

File

core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php, line 28

Class

UserNameFormatter
Plugin implementation of the 'user_name' formatter.

Namespace

Drupal\user\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
    $options = parent::defaultSettings();
    $options['link_to_entity'] = TRUE;
    return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.