summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-03-31 14:44:31 (GMT)
committerAlex Pott2015-03-31 14:44:31 (GMT)
commit1673844210e9075ae8c8ba787e2a8e5b78fe81cc (patch)
tree6c15bfe052f02dd07566b488786ef8ab0e2da8c1
parentf4a9d47a5d6cda8ce5d2abafcd2e98184023a7d9 (diff)
Issue #2392221 by er.pushpinderrana, ClientGuy, zealfire: install_run_task() and install_tasks() don't document the task structure
-rw-r--r--core/includes/install.core.inc9
-rw-r--r--core/modules/system/module.api.php12
2 files changed, 17 insertions, 4 deletions
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index a6e918f..dbab96b 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -545,7 +545,8 @@ function install_run_tasks(&$install_state) {
* Runs an individual installation task.
*
* @param $task
- * An array of information about the task to be run.
+ * An array of information about the task array as returned by
+ * hook_install_tasks().
* @param $install_state
* An array of information about the current installation state. This is
* passed in by reference so that it can be modified by the task.
@@ -678,11 +679,15 @@ function install_tasks_to_perform($install_state) {
* hasn't been selected yet, we don't yet know which profile tasks will be
* available).
*
+ * You can override this using hook_install_tasks()
+ * or hook_install_tasks_alter().
+ *
* @param $install_state
* An array of information about the current installation state.
*
* @return
- * A list of tasks, with associated metadata.
+ * A list of tasks, with associated metadata as returned by
+ * hook_install_tasks().
*/
function install_tasks($install_state) {
// Determine whether a translation file must be imported during the
diff --git a/core/modules/system/module.api.php b/core/modules/system/module.api.php
index 08344a4..52b77af 100644
--- a/core/modules/system/module.api.php
+++ b/core/modules/system/module.api.php
@@ -233,8 +233,9 @@ function hook_uninstall() {
*
* Any tasks you define here will be run, in order, after the installer has
* finished the site configuration step but before it has moved on to the
- * final import of languages and the end of the installation. You can have any
- * number of custom tasks to perform during this phase.
+ * final import of languages and the end of the installation. This is invoked
+ * by install_tasks(). You can have any number of custom tasks to perform
+ * during this phase.
*
* Each task you define here corresponds to a callback function which you must
* separately define and which is called when your task is run. This function
@@ -327,6 +328,8 @@ function hook_uninstall() {
*
* @see install_state_defaults()
* @see batch_set()
+ * @see hook_install_tasks_alter()
+ * @see install_tasks()
*/
function hook_install_tasks(&$install_state) {
// Here, we define a variable to allow tasks to indicate that a particular,
@@ -396,12 +399,17 @@ function hook_install_tasks(&$install_state) {
* You can use this hook to change or replace any part of the Drupal
* installation process that occurs after the installation profile is selected.
*
+ * This hook is invoked on the install profile in install_tasks().
+ *
* @param $tasks
* An array of all available installation tasks, including those provided by
* Drupal core. You can modify this array to change or replace individual
* steps within the installation process.
* @param $install_state
* An array of information about the current installation state.
+ *
+ * @see hook_install_tasks()
+ * @see install_tasks()
*/
function hook_install_tasks_alter(&$tasks, $install_state) {
// Replace the entire site configuration form provided by Drupal core