public function SocialSendEmail::buildConfigurationForm in Open Social 8.7
Same name in this branch
- 8.7 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 8.7 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 8.5 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 8.6 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 8.8 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 10.3.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 10.0.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 10.1.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
- 10.2.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::buildConfigurationForm()
Configuration form builder.
If this method has implementation, the action is considered to be configurable.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state object.
Return value
array The configuration form.
2 calls to SocialSendEmail::buildConfigurationForm()
- SocialEventManagersSendEmail::buildConfigurationForm in modules/
social_features/ social_event/ modules/ social_event_managers/ src/ Plugin/ Action/ SocialEventManagersSendEmail.php - Configuration form builder.
- SocialSendEmail::buildConfigurationForm in modules/
social_features/ social_group/ src/ Plugin/ Action/ SocialSendEmail.php - Configuration form builder.
2 methods override SocialSendEmail::buildConfigurationForm()
- SocialEventManagersSendEmail::buildConfigurationForm in modules/
social_features/ social_event/ modules/ social_event_managers/ src/ Plugin/ Action/ SocialEventManagersSendEmail.php - Configuration form builder.
- SocialSendEmail::buildConfigurationForm in modules/
social_features/ social_group/ src/ Plugin/ Action/ SocialSendEmail.php - Configuration form builder.
File
- modules/
social_features/ social_user/ src/ Plugin/ Action/ SocialSendEmail.php, line 212
Class
- SocialSendEmail
- An example action covering most of the possible options.
Namespace
Drupal\social_user\Plugin\ActionCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['reply'] = [
'#type' => 'email',
'#title' => $this
->t('Reply-to'),
'#description' => $this
->t("The email you are about to send is sent from the platform's email address. If you wish to receive replies on this email on your own email address, please specify your email address in this field."),
];
$form['subject'] = [
'#type' => 'textfield',
'#title' => $this
->t('Subject'),
'#required' => TRUE,
'#default_value' => $form_state
->getValue('subject'),
'#maxlength' => '254',
];
$form['message'] = [
'#type' => 'textarea',
'#title' => $this
->t('Message'),
'#required' => TRUE,
'#default_value' => $form_state
->getValue('message'),
'#cols' => '80',
'#rows' => '20',
];
if ($this->allowTextFormat) {
$form['message']['#type'] = 'text_format';
$form['message']['#allowed_formats'] = [
'mail_html',
];
}
$form['#title'] = $this
->t('Send an email to :selected_count members', [
':selected_count' => $this->context['selected_count'],
]);
if (isset($form['list'])) {
unset($form['list']);
}
$form['actions']['submit']['#value'] = $this
->t('Send email');
$classes = [
'button',
'btn',
'waves-effect',
'waves-btn',
];
$form['actions']['submit']['#attributes']['class'] = [
'button--primary',
'js-form-submit',
'form-submit',
'js-form-submit',
'btn-raised',
'btn-primary',
'waves-light',
] + $classes;
$form['actions']['cancel']['#attributes']['class'] = [
'button--danger',
'btn-flat',
] + $classes;
return $form;
}