summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/update/update.install
blob: ccd73e993bc6ecdd707bd11c13bd38864e2b5133 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

/**
 * @file
 * Install, update, and uninstall functions for the Update Status module.
 */

use Drupal\Core\Hook\Attribute\ProceduralHookScanStop;

/**
 * Implements hook_install().
 */
#[ProceduralHookScanStop]
function update_install(): void {
  $queue = \Drupal::queue('update_fetch_tasks', TRUE);
  $queue->createQueue();
}

/**
 * Implements hook_uninstall().
 */
function update_uninstall(): void {
  \Drupal::state()->delete('update.last_check');
  \Drupal::state()->delete('update.last_email_notification');

  $queue = \Drupal::queue('update_fetch_tasks');
  $queue->deleteQueue();
}

/**
 * Implements hook_update_last_removed().
 */
function update_update_last_removed(): int {
  return 8001;
}