public function FieldCollectionViewsFormatter::settingsForm in Field Collection Views 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/Field/FieldFormatter/FieldCollectionViewsFormatter.php \Drupal\field_collection_views\Plugin\Field\FieldFormatter\FieldCollectionViewsFormatter::settingsForm()
File
- src/
Plugin/ Field/ FieldFormatter/ FieldCollectionViewsFormatter.php, line 36
Class
- FieldCollectionViewsFormatter
- Plugin implementation of the 'views_field_collection_items' formatter.
Namespace
Drupal\field_collection_views\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['name'] = [
'#type' => 'textfield',
'#title' => t('Name'),
'#default_value' => $this
->getSetting('name'),
'#description' => t('The machine name of the view to embed.'),
];
$element['display_id'] = [
'#type' => 'textfield',
'#title' => t('Display id'),
'#default_value' => $this
->getSetting('display_id'),
'#description' => t('The display id to embed.'),
];
$element['add'] = [
'#type' => 'textfield',
'#title' => t('Add link title'),
'#default_value' => $this
->getSetting('add'),
'#description' => t('Leave the title empty, to hide the link.'),
];
return $element;
}