public function SocialGroupViewsBulkOperationsBulkForm::getBulkOptions in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 8.5 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 8.6 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 8.7 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 8.8 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 10.3.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 10.1.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- 10.2.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
Returns the available operations for this form.
Return value
array An associative array of operations, suitable for a select element.
Overrides ViewsBulkOperationsBulkForm::getBulkOptions
1 call to SocialGroupViewsBulkOperationsBulkForm::getBulkOptions()
- SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate in modules/
social_features/ social_group/ src/ Plugin/ views/ field/ SocialGroupViewsBulkOperationsBulkForm.php
File
- modules/
social_features/ social_group/ src/ Plugin/ views/ field/ SocialGroupViewsBulkOperationsBulkForm.php, line 22
Class
- SocialGroupViewsBulkOperationsBulkForm
- Defines the Groups Views Bulk Operations field plugin.
Namespace
Drupal\social_group\Plugin\views\fieldCode
public function getBulkOptions() {
$bulk_options = parent::getBulkOptions();
if ($this->view
->id() !== 'group_manage_members') {
return $bulk_options;
}
foreach ($bulk_options as $id => &$label) {
if (!empty($this->options['preconfiguration'][$id]['label_override'])) {
$real_label = $this->options['preconfiguration'][$id]['label_override'];
}
else {
$real_label = $this->actions[$id]['label'];
}
switch ($id) {
case 'social_group_members_export_member_action':
case 'social_group_delete_group_content_action':
$label = $this
->t('<b>@action</b> selected members', [
'@action' => $real_label,
]);
break;
case 'social_group_send_email_action':
$label = $this
->t('<b>@action</b>', [
'@action' => $real_label,
]);
break;
case 'social_group_change_member_role_action':
$label = $this
->t('<b>@action</b> of selected members', [
'@action' => $real_label,
]);
break;
}
}
return $bulk_options;
}