class SocialSendEmail in Open Social 8.5
Same name in this branch
- 8.5 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 8.5 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 8.6 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 8.7 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 8.8 modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 10.3.x modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 10.0.x modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 10.1.x modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
- 10.2.x modules/social_features/social_group/src/Plugin/Action/SocialSendEmail.php \Drupal\social_group\Plugin\Action\SocialSendEmail
Send email to group members.
Plugin annotation
@Action(
id = "social_group_send_email_action",
label = @Translation("Send email to group members"),
type = "group_content",
confirm = TRUE,
)
Hierarchy
- class \Drupal\social_user\Plugin\Action\SocialSendEmail extends \Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase implements \Drupal\views_bulk_operations\Action\ViewsBulkOperationsPreconfigurationInterface, ContainerFactoryPluginInterface
- class \Drupal\social_group\Plugin\Action\SocialSendEmail
Expanded class hierarchy of SocialSendEmail
File
- modules/
social_features/ social_group/ src/ Plugin/ Action/ SocialSendEmail.php, line 20
Namespace
Drupal\social_group\Plugin\ActionView source
class SocialSendEmail extends SocialSendEmailBase {
/**
* {@inheritdoc}
*/
public function execute($entity = NULL) {
/** @var \Drupal\group\Entity\GroupContentInterface $entity */
parent::execute($entity
->getEntity());
return $this
->t('Send mail');
}
/**
* {@inheritdoc}
*/
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
if ($object instanceof GroupContentInterface) {
/** @var \Drupal\group\Entity\GroupContentInterface $object */
return $object
->access('view', $account, $return_as_object);
}
return TRUE;
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
// Add title to the form as well.
if ($form['#title'] !== NULL) {
$selected_count = $this->context['selected_count'];
$subtitle = $this
->formatPlural($selected_count, 'Configure the email you want to send to the one member you have selected.', 'Configure the email you want to send to the @count members you have selected.');
$form['subtitle'] = [
'#type' => 'html_tag',
'#tag' => 'div',
'#attributes' => [
'class' => [
'placeholder',
],
],
'#value' => $subtitle,
];
}
return parent::buildConfigurationForm($form, $form_state);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialSendEmail:: |
protected | property | The email validator. | |
SocialSendEmail:: |
protected | property | The language manager. | |
SocialSendEmail:: |
protected | property | A logger instance. | |
SocialSendEmail:: |
protected | property | The mail manager. | |
SocialSendEmail:: |
protected | property | The user storage. | |
SocialSendEmail:: |
protected | property | The token service. | |
SocialSendEmail:: |
public | function |
Overrides SocialSendEmail:: |
|
SocialSendEmail:: |
public | function |
Configuration form builder. Overrides SocialSendEmail:: |
|
SocialSendEmail:: |
public | function | 1 | |
SocialSendEmail:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
1 |
SocialSendEmail:: |
public | function |
Overrides SocialSendEmail:: |
|
SocialSendEmail:: |
public | function | Returns the email address of this account. | 1 |
SocialSendEmail:: |
public | function | Constructs a ViewsBulkOperationSendEmail object. | 1 |