- Issue created by @swirt
- Merge request !12Issue #3441371 by swirt: Add optional method calls to perform pre and post batch. β (Merged) created by swirt
- πΊπΈUnited States swirt Florida
The ability to add the following methods to your custom Batch Operation class has been added.
/** * Optional method that is called once BEFORE the run of the batch. * * This can be used to turn on maintenance mode, disable indexing, or * anything else that needs to be done before running the BatchOperation. * * @param array $sandbox * The sandbox by reference. Used for keeping state in the batch. * * @return string * A message that will be added to the BatchOpLog */ public function preBatchMethod(&$sandbox): string; /** * Optional method that is called once AFTER the run of the batch. * * This can be used to undo anything that was done in preBatchMethod(). Like * turn off maintenance mode, re-enable indexing, or * anything else that needs to be done after running the BatchOperation. * * @param array $sandbox * The sandbox by reference. Used for keeping state in the batch. * * @return string * A message that will be added to the BatchOpLog */ public function postBatchMethod(&$sandbox): string;
- Status changed to Fixed
5 months ago 4:39am 12 June 2024 - Status changed to Fixed
5 months ago 4:47am 12 June 2024 - πΊπΈUnited States swirt Florida
This has been released with 1.0.1-beta8 β