update_cron

update_cron() Implements hook_cron(). File core/modules/update/update.module, line 212 Handles updates of Drupal core and contributed projects. Code function update_cron() { $update_config = \Drupal::config('update.settings'); $frequency = $update_config->get('check.interval_days'); $interval = 60 * 60 * 24 * $frequency; $last_check = \Drupal::state()->get('update.last_check') ? : 0; if ((REQUEST_TIME - $last_check) > $interval) { // If the configured update interval ha

update_do_one

update_do_one($module, $number, $dependency_map, &$context) 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 as a string indicating success, for example: return t('New index added successfully.'); Alternatively, it may return nothing. In that case, no message will be displayed at all. If it fails for whatever reason, it should throw an instance of Drup

update_fetch_data

update_fetch_data() Attempts to fetch update data after loading the necessary include file. See also \Drupal\update\UpdateProcessor::fetchData() File core/modules/update/update.module, line 395 Handles updates of Drupal core and contributed projects. Code function update_fetch_data() { \Drupal::service('update.processor')->fetchData(); }

update_fetch_data_finished

update_fetch_data_finished($success, $results) Batch callback: Performs actions when all fetch tasks have been completed. Parameters $success: TRUE if the batch operation was successful; FALSE if there were errors. $results: An associative array of results from the batch operation, including the key 'updated' which holds the total number of projects we fetched available update data for. File core/modules/update/update.module, line 409 Handles updates of Drupal core and contributed projects.

UPDATE_CURRENT

Project is up to date. File core/modules/update/update.module, line 44 Handles updates of Drupal core and contributed projects. Code const UPDATE_CURRENT = 5;

update_delete_file_if_stale

update_delete_file_if_stale($path) Deletes stale files and directories from the update manager disk cache. Files and directories older than 6 hours and development snapshots older than 5 minutes are considered stale. We only cache development snapshots for 5 minutes since otherwise updated snapshots might not be downloaded as expected. When checking file ages, we need to use the ctime, not the mtime (modification time) since many (all?) tar implementations go out of their way to set the mtime o

update_create_fetch_task

update_create_fetch_task($project) Adds a task to the queue for fetching release history data for a project. We only create a new fetch task if there's no task already in the queue for this particular project (based on 'update_fetch_task' key-value collection). Parameters $project: Associative array of information about a project as created by \Drupal\Update\UpdateManager::getProjects(), including keys such as 'name' (short name), and the 'info' array with data from a .info.yml file for the pr

update_build_dependency_graph

update_build_dependency_graph($update_functions) Constructs a graph which encodes the dependencies between module updates. This function returns an associative array which contains a "directed graph" representation of the dependencies between a provided list of update functions, as well as any outside update functions that they directly depend on but that were not in the provided list. The vertices of the graph represent the update functions themselves, and each edge represents a requirement th

update_clear_update_disk_cache

update_clear_update_disk_cache() Clears the temporary files and directories based on file age from disk. File core/modules/update/update.module, line 707 Handles updates of Drupal core and contributed projects. Code function update_clear_update_disk_cache() { // List of update module cache directories. Do not create the directories if // they do not exist. $directories = array( _update_manager_cache_directory(FALSE), _update_manager_extract_directory(FALSE), ); // Search fo

update_calculate_project_update_status

update_calculate_project_update_status(&$project_data, $available) Calculates the current update status of a specific project. This function is the heart of the update status feature. For each project it is invoked with, it first checks if the project has been flagged with a special status like "unsupported" or "insecure", or if the project node itself has been unpublished. In any of those cases, the project is marked with an error and the next project is considered. If the project itself i