public function OrderAnonymize::executeMultiple in Commerce Bulk 8
Executes the plugin for an array of objects.
Parameters
array $objects: An array of entities.
Overrides ActionBase::executeMultiple
File
- src/
Plugin/ Action/ OrderAnonymize.php, line 171
Class
- OrderAnonymize
- Delete terms.
Namespace
Drupal\commerce_bulk\Plugin\ActionCode
public function executeMultiple(array $orders) {
if ($orders) {
$ids = [];
foreach ($orders as $order) {
$ids[] = $order
->id();
}
$url = $order
->toUrl();
$query = [
'destination' => \Drupal::request()
->getRequestUri(),
'ids' => implode('|', $ids),
];
$path = $url::fromUserInput('/admin/config/system/actions/configure/' . $this
->getPluginId(), [
'query' => $query,
])
->toString();
$response = new RedirectResponse($path);
$response
->send();
}
}