You are here

public static function ProfileFormWidget::attachSubmit in Profile 8

Process callback: Adds the widget's submit handler.

File

src/Plugin/Field/FieldWidget/ProfileFormWidget.php, line 249

Class

ProfileFormWidget
Plugin implementation of the 'profile_form' widget.

Namespace

Drupal\profile\Plugin\Field\FieldWidget

Code

public static function attachSubmit(array $form, FormStateInterface $form_state) {
  $form['actions']['submit']['#submit'][] = [
    static::class,
    'saveProfiles',
  ];
  return $form;
}