function EmailAction::buildConfigurationForm
Same name in other branches
- 9 core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php \Drupal\Core\Action\Plugin\Action\EmailAction::buildConfigurationForm()
- 8.9.x core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php \Drupal\Core\Action\Plugin\Action\EmailAction::buildConfigurationForm()
- 11.x core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php \Drupal\Core\Action\Plugin\Action\EmailAction::buildConfigurationForm()
Overrides PluginFormInterface::buildConfigurationForm
File
-
core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ EmailAction.php, line 164
Class
- EmailAction
- Sends an email message.
Namespace
Drupal\Core\Action\Plugin\ActionCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['recipient'] = [
'#type' => 'textfield',
'#title' => $this->t('Recipient email address'),
'#default_value' => $this->configuration['recipient'],
'#maxlength' => '254',
'#description' => $this->t('You may also use tokens: [node:author:mail], [comment:author:mail], etc. Separate recipients with a comma.'),
];
$form['subject'] = [
'#type' => 'textfield',
'#title' => $this->t('Subject'),
'#default_value' => $this->configuration['subject'],
'#maxlength' => '254',
'#description' => $this->t('The subject of the message.'),
];
$form['message'] = [
'#type' => 'textarea',
'#title' => $this->t('Message'),
'#default_value' => $this->configuration['message'],
'#cols' => '80',
'#rows' => '20',
'#description' => $this->t('The message that should be sent. You may include placeholders like [node:title], [user:account-name], [user:display-name] and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.