public function SmsSendWidget::settingsForm in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php \Drupal\sms_sendtophone\Plugin\Field\FieldWidget\SmsSendWidget::settingsForm()
- 2.1.x modules/sms_sendtophone/src/Plugin/Field/FieldWidget/SmsSendWidget.php \Drupal\sms_sendtophone\Plugin\Field\FieldWidget\SmsSendWidget::settingsForm()
Returns a form to configure settings for the widget.
Invoked from \Drupal\field_ui\Form\EntityDisplayFormBase to allow administrators to configure the widget. The field_ui module takes care of handling submitted form values.
Parameters
array $form: The form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form definition for the widget settings.
Overrides WidgetBase::settingsForm
File
- modules/
sms_sendtophone/ src/ Plugin/ Field/ FieldWidget/ SmsSendWidget.php, line 56
Class
- SmsSendWidget
- Plugin implementation of the 'sms_sendtophone' widget.
Namespace
Drupal\sms_sendtophone\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form = parent::settingsForm($form, $form_state);
$form['rows'] = [
'#type' => 'textfield',
'#title' => $this
->t('Rows'),
'#default_value' => $this->settings['rows'],
'#required' => TRUE,
];
return $form;
}