class ExportMember in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 8.5 modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 8.7 modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 8.8 modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 10.3.x modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 10.0.x modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 10.1.x modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
- 10.2.x modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php \Drupal\social_group_members_export\Plugin\Action\ExportMember
Exports a group member accounts to CSV.
Plugin annotation
@Action(
id = "social_group_members_export_member_action",
label = @Translation("Export the selected members to CSV"),
type = "group_content",
confirm = TRUE,
)
Hierarchy
- class \Drupal\social_user_export\Plugin\Action\ExportUser extends \Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase implements ContainerFactoryPluginInterface, PluginFormInterface uses MessengerTrait
- class \Drupal\social_group_members_export\Plugin\Action\ExportMember
Expanded class hierarchy of ExportMember
File
- modules/
social_features/ social_group/ modules/ social_group_members_export/ src/ Plugin/ Action/ ExportMember.php, line 20
Namespace
Drupal\social_group_members_export\Plugin\ActionView source
class ExportMember extends ExportUser {
/**
* {@inheritdoc}
*/
public function executeMultiple(array $entities) {
/** @var \Drupal\group\Entity\GroupContentInterface $entity */
foreach ($entities as &$entity) {
$entity = $entity
->getEntity();
}
parent::executeMultiple($entities);
}
/**
* {@inheritdoc}
*/
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
if ($object instanceof GroupContentInterface && $object
->getContentPlugin()
->getPluginId() === 'group_membership') {
$access = $object
->getEntity()
->access('view', $account, TRUE);
}
else {
$access = AccessResult::forbidden();
}
return $return_as_object ? $access : $access
->isAllowed();
}
/**
* {@inheritdoc}
*/
protected function generateFilePath() : string {
$hash = md5(microtime(TRUE));
return 'export-members-' . substr($hash, 20, 12) . '.csv';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExportMember:: |
public | function |
Overrides ExportUser:: |
|
ExportMember:: |
public | function |
Overrides ExportUser:: |
|
ExportMember:: |
protected | function |
Returns a unique file path for this export. Overrides ExportUser:: |
|
ExportUser:: |
protected | property | A logger instance. | |
ExportUser:: |
protected | property | User export plugin definitions. | |
ExportUser:: |
protected | property | The User export plugin manager. | |
ExportUser:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
|
ExportUser:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
1 |
ExportUser:: |
public | function | ||
ExportUser:: |
protected | function | Returns the directory that forms the base for this exports file output. | |
ExportUser:: |
public | function | Gets export plugin's configuration. | 1 |
ExportUser:: |
public | function | Constructs a ExportUser object. | 1 |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |