UpdateExtensionHooks.php

Same filename and directory in other branches
  1. 11.x core/modules/update/src/Hook/UpdateExtensionHooks.php

Namespace

Drupal\update\Hook

File

core/modules/update/src/Hook/UpdateExtensionHooks.php

View source
<?php

namespace Drupal\update\Hook;

use Drupal\Core\Hook\Attribute\Hook;
use Drupal\update\UpdateManagerInterface;

/**
 * Hook implementations for update.
 */
class UpdateExtensionHooks {
  public function __construct(protected readonly UpdateManagerInterface $updateManager) {
  }
  
  /**
   * Implements hook_themes_installed().
   *
   * Implements hook_themes_uninstalled().
   *
   * Implements hook_modules_installed().
   *
   * Implements hook_modules_uninstalled().
   *
   * If extensions are installed or uninstalled, we invalidate the information
   * of available updates.
   */
  public function extensionsChanged($themes) : void {
    // Clear all Update Status module data.
    $this->updateManager
      ->reset();
  }

}

Classes

Title Deprecated Summary
UpdateExtensionHooks Hook implementations for update.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.