diff --git a/core/includes/image.inc b/core/includes/image.inc index f6ae7f1..6191179 100644 --- a/core/includes/image.inc +++ b/core/includes/image.inc @@ -34,7 +34,7 @@ */ /** - * Return a list of available toolkits. + * Returns a list of available toolkits. * * @return * An array with the toolkit names as keys and the descriptions as values. @@ -55,7 +55,7 @@ function image_get_available_toolkits() { } /** - * Retrieve the name of the currently used toolkit. + * Retrieves the name of the currently used toolkit. * * @return * String containing the name of the selected toolkit, or FALSE on error. @@ -101,7 +101,7 @@ function image_toolkit_invoke($method, stdClass $image, array $params = array()) } /** - * Get details about an image. + * Gets details about an image. * * Drupal supports GIF, JPG and PNG file formats when used with the GD * toolkit, and may support others, depending on which toolkits are @@ -261,7 +261,7 @@ function image_scale(stdClass $image, $width = NULL, $height = NULL, $upscale = } /** - * Resize an image to the given dimensions (ignoring aspect ratio). + * Resizes an image to the given dimensions (ignoring aspect ratio). * * @param $image * An image object returned by image_load(). @@ -284,7 +284,7 @@ function image_resize(stdClass $image, $width, $height) { } /** - * Rotate an image by the given number of degrees. + * Rotates an image by the given number of degrees. * * @param $image * An image object returned by image_load(). @@ -308,7 +308,7 @@ function image_rotate(stdClass $image, $degrees, $background = NULL) { } /** - * Crop an image to the rectangle specified by the given rectangle. + * Crops an image to the rectangle specified by the given rectangle. * * @param $image * An image object returned by image_load(). @@ -340,7 +340,7 @@ function image_crop(stdClass $image, $x, $y, $width, $height) { } /** - * Convert an image to grayscale. + * Converts an image to grayscale. * * @param $image * An image object returned by image_load(). @@ -357,7 +357,7 @@ function image_desaturate(stdClass $image) { /** - * Load an image file and return an image object. + * Loads an image file and returns an image object. * * Any changes to the file are not saved until image_save() is called. * @@ -400,7 +400,7 @@ function image_load($file, $toolkit = FALSE) { } /** - * Close the image and save the changes to a file. + * Closes the image and saves the changes to a file. * * @param $image * An image object returned by image_load(). The object's 'info' property diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 37b3281..d22075d 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -9,8 +9,7 @@ use Drupal\Core\Database\Install\TaskException; */ /** - * Global flag to indicate that a task should not be run during the current - * installation request. + * Do not run the task during the current installation request. * * This can be used to skip running an installation task when certain * conditions are met, even though the task may still show on the list of @@ -23,17 +22,14 @@ use Drupal\Core\Database\Install\TaskException; const INSTALL_TASK_SKIP = 1; /** - * Global flag to indicate that a task should be run on each installation - * request that reaches it. + * Run the task on each installation request that reaches it. * * This is primarily used by the Drupal installer for bootstrap-related tasks. */ const INSTALL_TASK_RUN_IF_REACHED = 2; /** - * Global flag to indicate that a task should be run on each installation - * request that reaches it, until the database is set up and we are able to - * record the fact that it already ran. + * Run the task on each installation request until the database is set up. * * This is the default method for running tasks and should be used for most * tasks that occur after the database is set up; these tasks will then run @@ -203,7 +199,7 @@ function install_state_defaults() { } /** - * Begin an installation request, modifying the installation state as needed. + * Begins an installation request, modifying the installation state as needed. * * This function performs commands that must run at the beginning of every page * request. It throws an exception if the installation should not proceed. @@ -747,7 +743,7 @@ function install_display_output($output, $install_state) { } /** - * Installation task; verify the requirements for installing Drupal. + * Verifies the requirements for installing Drupal. * * @param $install_state * An array of information about the current installation state. @@ -798,7 +794,7 @@ function install_verify_requirements(&$install_state) { } /** - * Installation task; install the Drupal system module. + * Installs the Drupal system module. * * @param $install_state * An array of information about the current installation state. @@ -824,7 +820,7 @@ function install_system_module(&$install_state) { } /** - * Verify and return the last installation task that was completed. + * Verifies and returns the last installation task that was completed. * * @return * The last completed task, if there is one. An exception is thrown if Drupal @@ -868,7 +864,7 @@ function install_verify_settings() { } /** - * Verify PDO library. + * Verifies the PDO library. */ function install_verify_pdo() { // PDO was moved to PHP core in 5.2.0, but the old extension (targeting 5.0 @@ -880,15 +876,13 @@ function install_verify_pdo() { } /** - * Installation task; define a form to configure and rewrite settings.php. + * Form constructor for a form to configure and rewrite settings.php. * - * @param $form_state - * An associative array containing the current state of the form. * @param $install_state * An array of information about the current installation state. * - * @return - * The form API definition for the database configuration form. + * @see install_settings_form_validate() + * @see install_settings_form_submit() */ function install_settings_form($form, &$form_state, &$install_state) { global $databases; @@ -950,7 +944,9 @@ function install_settings_form($form, &$form_state, &$install_state) { } /** - * Form API validate for install_settings form. + * Form validation handler for install_settings_form(). + * + * @see install_settings_form_submit() */ function install_settings_form_validate($form, &$form_state) { $driver = $form_state['values']['driver']; @@ -1007,7 +1003,9 @@ function install_database_errors($database, $settings_file) { } /** - * Form API submit for install_settings form. + * Form submission handler for install_settings_form(). + * + * @see install_settings_form_validate() */ function install_settings_form_submit($form, &$form_state) { global $install_state; @@ -1067,7 +1065,7 @@ function install_find_profiles() { } /** - * Installation task; select which profile to install. + * Selects which profile to install. * * @param $install_state * An array of information about the current installation state. The chosen @@ -1106,8 +1104,7 @@ function install_select_profile(&$install_state) { } /** - * Helper function for automatically selecting an installation profile from a - * list or from a selection passed in via $_POST. + * Selects an installation profile from a list or from a $_POST submission. */ function _install_select_profile($profiles) { if (sizeof($profiles) == 0) { @@ -1130,10 +1127,8 @@ function _install_select_profile($profiles) { } /** - * Form API array definition for the profile selection form. + * Form constructor for the profile selection form. * - * @param $form_state - * Array of metadata about state of form processing. * @param $profile_files * Array of .profile files, as returned from file_scan_directory(). */ @@ -1198,7 +1193,7 @@ function install_select_profile_form($form, &$form_state, $profile_files) { } /** - * Find all .po files useful for the installer. + * Finds all .po files that are useful to the installer. */ function install_find_translations() { $files = install_find_translation_files(); @@ -1217,7 +1212,7 @@ function install_find_translations() { } /** - * Find installer translations either for a specific langcode or all languages. + * Finds installer translations either for a specific langcode or all languages. * * @param $langcode * (optional) The language code corresponding to the language for which we @@ -1237,7 +1232,7 @@ function install_find_translation_files($langcode = NULL) { } /** - * Installation task; select which language to use. + * Selects which language to use during installation. * * @param $install_state * An array of information about the current installation state. The chosen @@ -1320,7 +1315,7 @@ function install_select_language(&$install_state) { } /** - * Form API array definition for language selection. + * Form constructor for the language selection form. */ function install_select_language_form($form, &$form_state, $files) { include_once DRUPAL_ROOT . '/core/includes/standard.inc'; @@ -1386,7 +1381,7 @@ function install_already_done_error() { } /** - * Installation task; load information about the chosen profile. + * Loads information about the chosen profile during installation. * * @param $install_state * An array of information about the current installation state. The loaded @@ -1405,7 +1400,7 @@ function install_load_profile(&$install_state) { } /** - * Installation task; perform a full bootstrap of Drupal. + * Performs a full bootstrap of Drupal during installation. * * @param $install_state * An array of information about the current installation state. @@ -1415,7 +1410,7 @@ function install_bootstrap_full(&$install_state) { } /** - * Installation task; install required modules via a batch process. + * Installs required modules via a batch process. * * @param $install_state * An array of information about the current installation state. @@ -1468,7 +1463,7 @@ function install_profile_modules(&$install_state) { } /** - * Installation task; import languages via a batch process. + * Imports languages via a batch process during installation. * * @param $install_state * An array of information about the current installation state. @@ -1509,15 +1504,13 @@ function install_import_translations(&$install_state) { } /** - * Installation task; configure settings for the new site. + * Form constructor for a form to configure the new site. * - * @param $form_state - * An associative array containing the current state of the form. * @param $install_state * An array of information about the current installation state. * - * @return - * The form API definition for the site configuration form. + * @see install_configure_form_validate() + * @see install_configure_form_submit() */ function install_configure_form($form, &$form_state, &$install_state) { drupal_set_title(st('Configure site')); @@ -1563,7 +1556,7 @@ function install_configure_form($form, &$form_state, &$install_state) { } /** - * Installation task; finish importing files at end of installation. + * Finishes importing files at end of installation. * * @param $install_state * An array of information about the current installation state. @@ -1582,7 +1575,7 @@ function install_import_translations_remaining(&$install_state) { } /** - * Installation task; perform final steps and display a 'finished' page. + * Performs final installation steps and displays a 'finished' page. * * @param $install_state * An array of information about the current installation state. @@ -1769,7 +1762,11 @@ function install_check_requirements($install_state) { } /** - * Forms API array definition for site configuration. + * Returns a Forms API array definition for site configuration. + * + * @see install_configure_form() + * @see install_configure_form_validate() + * @see install_configure_form_submit() */ function _install_configure_form($form, &$form_state, &$install_state) { $form['site_information'] = array( @@ -1880,7 +1877,9 @@ function _install_configure_form($form, &$form_state, &$install_state) { } /** - * Forms API validate for the site configuration form. + * Form validation handler for install_configure_form(). + * + * @see install_configure_form_submit() */ function install_configure_form_validate($form, &$form_state) { if ($error = user_validate_name($form_state['values']['account']['name'])) { @@ -1889,7 +1888,9 @@ function install_configure_form_validate($form, &$form_state) { } /** - * Forms API submit for the site configuration form. + * Form submission handler for install_configure_form(). + * + * @see install_configure_form_validate() */ function install_configure_form_submit($form, &$form_state) { global $user; diff --git a/core/includes/install.inc b/core/includes/install.inc index 72adf1c..2d7c663 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -4,6 +4,11 @@ use Drupal\Core\Database\Database; use Drupal\Core\Config\SignedFileStorage; /** + * @file + * API functions for installing modules and themes. + */ + +/** * Indicates that a module has not been installed yet. */ const SCHEMA_UNINSTALLED = -1; @@ -114,6 +119,7 @@ function drupal_install_profile_distribution_name() { * @param $file * The name of the file calling this function so we can strip it out of * the URI when generating the base_url. + * * @return * The auto-detected $base_url that should be configured in settings.php */ @@ -265,6 +271,7 @@ function drupal_rewrite_settings($settings = array()) { * * @param $install_state * An array of information about the current installation state. + * * @return * The list of modules to install. */ @@ -431,6 +438,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents * An optional bitmask created from various FILE_* constants. * @param $type * The type of file. Can be file (default), dir, or link. + * * @return * TRUE on success or FALSE on failure. A message is set for the latter. */ @@ -510,6 +518,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') { * The permissions of the directory to create. * @param $message * (optional) Whether to output messages. Defaults to TRUE. + * * @return * TRUE/FALSE whether or not the directory was successfully created. */ @@ -558,6 +567,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) { * The desired permissions for the file. * @param $message * (optional) Whether to output messages. Defaults to TRUE. + * * @return * TRUE/FALSE whether or not we were able to fix the file's permissions. */ @@ -765,6 +775,7 @@ function st($string, array $args = array(), array $options = array()) { * * @param $profile * Name of install profile to check. + * * @return * Array of the install profile's requirements. */ @@ -797,6 +808,7 @@ function drupal_check_profile($profile) { * @param $requirements * An array of requirements, in the same format as is returned by * hook_requirements(). + * * @return * The highest severity in the array. */ @@ -815,6 +827,7 @@ function drupal_requirements_severity(&$requirements) { * * @param $module * Machine name of module to check. + * * @return * TRUE/FALSE depending on the requirements are in place. */ diff --git a/core/includes/menu.inc b/core/includes/menu.inc index fecd158..520e6e6 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -2094,8 +2094,6 @@ function menu_local_tasks($level = 0) { * local tasks for a given system path. All local tasks of the tab type * MENU_CONTEXT_INLINE are taken into account. * - * @see hook_menu() - * * For example, when considering the following registered local tasks: * - node/%node/view (default local task) with no 'context' defined * - node/%node/edit with context: MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE @@ -2123,6 +2121,7 @@ function menu_local_tasks($level = 0) { * A list of menu router items that are local tasks for the passed-in path. * * @see contextual_links_preprocess() + * @see hook_menu() */ function menu_contextual_links($module, $parent_path, $args) { static $path_empty = array(); @@ -3177,6 +3176,7 @@ function menu_link_save(&$item, $existing_item = array(), $parent_candidates = a * A menu link. * @param $parent_candidates * An array of menu links keyed by mlid. + * * @return * A menu link structure of the possible parent or FALSE if no valid parent * has been found.