class SocialGroupViewsBulkOperationsConfirmAction in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 8.5 modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 8.6 modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 8.7 modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 8.8 modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 10.0.x modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 10.1.x modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- 10.2.x modules/social_features/social_group/modules/social_group_gvbo/src/Form/SocialGroupViewsBulkOperationsConfirmAction.php \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
Default action execution confirmation form.
Hierarchy
- class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, MessengerTrait, RedirectDestinationTrait, StringTranslationTrait
- class \Drupal\views_bulk_operations\Form\ConfirmAction uses ViewsBulkOperationsFormTrait
- class \Drupal\social_group_gvbo\Form\SocialGroupViewsBulkOperationsConfirmAction
- class \Drupal\views_bulk_operations\Form\ConfirmAction uses ViewsBulkOperationsFormTrait
Expanded class hierarchy of SocialGroupViewsBulkOperationsConfirmAction
1 string reference to 'SocialGroupViewsBulkOperationsConfirmAction'
- social_group_gvbo.routing.yml in modules/
social_features/ social_group/ modules/ social_group_gvbo/ social_group_gvbo.routing.yml - modules/social_features/social_group/modules/social_group_gvbo/social_group_gvbo.routing.yml
File
- modules/
social_features/ social_group/ modules/ social_group_gvbo/ src/ Form/ SocialGroupViewsBulkOperationsConfirmAction.php, line 11
Namespace
Drupal\social_group_gvbo\FormView source
class SocialGroupViewsBulkOperationsConfirmAction extends ConfirmAction {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, $view_id = 'group_manage_members', $display_id = 'page_group_manage_members') {
$form = parent::buildForm($form, $form_state, $view_id, $display_id);
$form_data = $this
->getFormData($view_id, $display_id);
// Show a descriptive message in the confirm action form.
if (isset($form_data['action_id'])) {
$form['description'] = [
'#markup' => $this
->formatPlural($form_data['selected_count'], 'Are you sure you want to "%action" the following member?', 'Are you sure you want to "%action" the following %count members?', [
'%action' => $form_data['action_label'],
'%count' => $form_data['selected_count'],
]),
'#weight' => -10,
];
if (strpos($form_data['action_id'], 'mail') !== FALSE) {
$form['description'] = [
'#markup' => $this
->formatPlural($form_data['selected_count'], 'Are you sure you want to send your email to the following member?', 'Are you sure you want to send your email to to the following %count members?', [
'%action' => $form_data['action_label'],
'%count' => $form_data['selected_count'],
]),
'#weight' => -10,
];
}
}
$form['actions']['submit']['#attributes']['class'] = [
'button button--primary js-form-submit form-submit btn js-form-submit btn-raised btn-primary waves-effect waves-btn waves-light',
];
$form['actions']['cancel']['#attributes']['class'] = [
'button button--danger btn btn-flat waves-effect waves-btn',
];
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfirmAction:: |
protected | property | Views Bulk Operations action manager. | |
ConfirmAction:: |
protected | property | Views Bulk Operations action processor. | |
ConfirmAction:: |
protected | property | The tempstore service. | |
ConfirmAction:: |
public static | function |
Instantiates a new instance of this class. Overrides FormBase:: |
|
ConfirmAction:: |
public | function |
Returns a unique string identifying the form. Overrides FormInterface:: |
|
ConfirmAction:: |
public | function |
Form submission handler. Overrides FormInterface:: |
|
ConfirmAction:: |
public | function | Constructor. | |
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
FormBase:: |
protected | property | The config factory. | 3 |
FormBase:: |
protected | property | The request stack. | 1 |
FormBase:: |
protected | property | The route match. | |
FormBase:: |
protected | function | Retrieves a configuration object. | |
FormBase:: |
protected | function | Gets the config factory for this form. | 3 |
FormBase:: |
private | function | Returns the service container. | |
FormBase:: |
protected | function | Gets the current user. | |
FormBase:: |
protected | function | Gets the request object. | |
FormBase:: |
protected | function | Gets the route match. | |
FormBase:: |
protected | function | Gets the logger for a specific channel. | |
FormBase:: |
protected | function | Returns a redirect response object for the specified route. | |
FormBase:: |
public | function | Resets the configuration factory. | |
FormBase:: |
public | function | Sets the config factory for this form. | |
FormBase:: |
public | function | Sets the request stack object to use. | |
FormBase:: |
public | function |
Form validation handler. Overrides FormInterface:: |
72 |
LoggerChannelTrait:: |
protected | property | The logger channel factory service. | |
LoggerChannelTrait:: |
protected | function | Gets the logger for a specific channel. | |
LoggerChannelTrait:: |
public | function | Injects the logger channel factory. | |
MessengerTrait:: |
protected | property | The messenger. | 27 |
MessengerTrait:: |
public | function | Gets the messenger. | 27 |
MessengerTrait:: |
public | function | Sets the messenger. | |
RedirectDestinationTrait:: |
protected | property | The redirect destination service. | 1 |
RedirectDestinationTrait:: |
protected | function | Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url. | |
RedirectDestinationTrait:: |
protected | function | Returns the redirect destination service. | |
RedirectDestinationTrait:: |
public | function | Sets the redirect destination service. | |
SocialGroupViewsBulkOperationsConfirmAction:: |
public | function |
Form constructor. Overrides ConfirmAction:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
ViewsBulkOperationsFormTrait:: |
protected | property | The tempstore name. | |
ViewsBulkOperationsFormTrait:: |
protected | property | The tempstore object associated with the current view. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Add a cancel button into a VBO form. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Add data needed for entity list rendering. | |
ViewsBulkOperationsFormTrait:: |
public static | function | Calculates the bulk form key for an entity. | |
ViewsBulkOperationsFormTrait:: |
public | function | Submit callback to cancel an action and return to the view. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Deletes the current view user tempstore data. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Helper function to prepare data needed for proper form display. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Get an entity list item from a bulk form key. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Build selected entities list renderable. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Build the selection info element. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Get the selection info title. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Initialize the current view tempstore object. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Gets the current view user tempstore data. | |
ViewsBulkOperationsFormTrait:: |
protected | function | Sets the current view user tempstore data. |