public function Link::settingsForm in Display Suite 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/DsField/Link.php \Drupal\ds\Plugin\DsField\Link::settingsForm()
- 8.3 src/Plugin/DsField/Link.php \Drupal\ds\Plugin\DsField\Link::settingsForm()
The form that holds the settings for this plugin.
Overrides DsFieldBase::settingsForm
File
- src/
Plugin/ DsField/ Link.php, line 15
Class
- Link
- Plugin that renders a link.
Namespace
Drupal\ds\Plugin\DsFieldCode
public function settingsForm($form, FormStateInterface $form_state) {
$config = $this
->getConfiguration();
$form['link text'] = array(
'#type' => 'textfield',
'#title' => 'Link text',
'#default_value' => $config['link text'],
);
$form['link class'] = array(
'#type' => 'textfield',
'#title' => 'Link class',
'#default_value' => $config['link class'],
'#description' => $this
->t('Put a class on the link. Eg: btn btn-default'),
);
$form['wrapper'] = array(
'#type' => 'textfield',
'#title' => 'Wrapper',
'#default_value' => $config['wrapper'],
'#description' => $this
->t('Eg: h1, h2, p'),
);
$form['class'] = array(
'#type' => 'textfield',
'#title' => 'Class',
'#default_value' => $config['class'],
'#description' => $this
->t('Put a class on the wrapper. Eg: block-title'),
);
return $form;
}