You are here

public function MessageNotifyUiSenderMailSettingsForm::form in Message UI 8

The form settings for the plugin.

Return value

array The form with the setting of the plugin.

Overrides MessageNotifyUiSenderSettingsFormInterface::form

File

modules/message_notify_ui/src/Plugin/MessageNotifyUiSenderSettingsForm/MessageNotifyUiSenderMailSettingsForm.php, line 24

Class

MessageNotifyUiSenderMailSettingsForm
Message notify plugin form for email.

Namespace

Drupal\message_notify_ui\Plugin\MessageNotifyUiSenderSettingsForm

Code

public function form() {
  return [
    'use_custom' => [
      '#type' => 'checkbox',
      '#title' => t('Use custom email'),
      '#description' => t('Use the message owner message'),
    ],
    'email' => [
      '#type' => 'email',
      '#title' => t('Email address'),
      '#description' => t('The email address'),
      '#states' => [
        'visible' => [
          ':input[name="use_custom"]' => [
            'checked' => TRUE,
          ],
        ],
      ],
    ],
  ];
}