You are here

public function Twilio::submitConfigurationForm in Twilio SMS Integration 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides SmsGatewayPluginBase::submitConfigurationForm

File

src/Plugin/SmsGateway/Twilio.php, line 95

Class

Twilio
Plugin annotation @SmsGateway( id = "twilio", label = @Translation("Twilio"), outgoing_message_max_recipients = 1, reports_push = TRUE, incoming = TRUE, incoming_route = TRUE )

Namespace

Drupal\sms_twilio\Plugin\SmsGateway

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this->configuration['account_sid'] = trim($form_state
    ->getValue('account_sid'));
  $this->configuration['auth_token'] = trim($form_state
    ->getValue('auth_token'));
  $this->configuration['from'] = $form_state
    ->getValue('from');
}