function UserNameFormatter::settingsForm
Same name in other branches
- 9 core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::settingsForm()
- 8.9.x core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::settingsForm()
- 11.x core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\UserNameFormatter::settingsForm()
Overrides FormatterBase::settingsForm
File
-
core/
modules/ user/ src/ Plugin/ Field/ FieldFormatter/ UserNameFormatter.php, line 38
Class
- UserNameFormatter
- Plugin implementation of the 'user_name' formatter.
Namespace
Drupal\user\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form = parent::settingsForm($form, $form_state);
$form['link_to_entity'] = [
'#type' => 'checkbox',
'#title' => $this->t('Link to the user'),
'#default_value' => $this->getSetting('link_to_entity'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.