From 6df765676a35f8f7ed471ef29394d44233f6d61f Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Wed, 14 Oct 2015 15:37:30 -0400 Subject: Issue #2195183 by cleaver, zopa, elgordogrande, sandykadam, jhodgdon, joachim, Eda: document Batch API callbacks as callback implementations --- includes/install.core.inc | 6 +++++- includes/locale.inc | 6 ++++++ includes/update.inc | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/install.core.inc b/includes/install.core.inc index e5a65865c..ad43b42af 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -1590,7 +1590,9 @@ function install_finished(&$install_state) { } /** - * Batch callback for batch installation of modules. + * Implements callback_batch_operation(). + * + * Performs batch installation of modules. */ function _install_module_batch($module, $module_name, &$context) { // Install and enable the module right away, so that the module will be @@ -1603,6 +1605,8 @@ function _install_module_batch($module, $module_name, &$context) { } /** + * Implements callback_batch_finished(). + * * 'Finished' callback for module installation batch. */ function _install_profile_modules_finished($success, $results, $operations) { diff --git a/includes/locale.inc b/includes/locale.inc index c7f958385..82c55e5c7 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2306,6 +2306,8 @@ function _locale_batch_build($files, $finished = NULL, $components = array()) { } /** + * Implements callback_batch_operation(). + * * Perform interface translation import as a batch step. * * @param $filepath @@ -2324,6 +2326,8 @@ function _locale_batch_import($filepath, &$context) { } /** + * Implements callback_batch_finished(). + * * Finished callback of system page locale import batch. * Inform the user of translation files imported. */ @@ -2334,6 +2338,8 @@ function _locale_batch_system_finished($success, $results) { } /** + * Implements callback_batch_finished(). + * * Finished callback of language addition locale import batch. * Inform the user of translation files imported. */ diff --git a/includes/update.inc b/includes/update.inc index a17161c9e..35a73c337 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -908,6 +908,8 @@ function update_get_d6_session_name() { } /** + * Implements callback_batch_operation(). + * * Performs one update and stores the results for display on the results page. * * If an update function completes successfully, it should return a message @@ -1078,6 +1080,8 @@ function update_batch($start, $redirect = NULL, $url = NULL, $batch = array(), $ } /** + * Implements callback_batch_finished(). + * * Finishes the update process and stores the results for eventual display. * * After the updates run, all caches are flushed. The update results are -- cgit v1.2.3