public static function Batch::batchSubmit in Organic groups 8
Submit handler for ::configurationForm().
File
- src/
Plugin/ OgDeleteOrphans/ Batch.php, line 57
Class
- Batch
- Performs a batch deletion of orphans.
Namespace
Drupal\og\Plugin\OgDeleteOrphansCode
public static function batchSubmit($form, FormStateInterface $form_state) {
$batch = [];
$steps = \Drupal::queue('og_orphaned_group_content')
->numberOfItems();
for ($i = 0; $i < $steps; $i++) {
$batch['operations'][] = [
'\\Drupal\\og\\Plugin\\OgDeleteOrphans\\Batch::step',
[],
];
}
batch_set($batch);
}