You are here

protected function UpdateRegistry::loadUpdateFile in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::loadUpdateFile()

Loads the {$this->updateType}.php file for a given extension.

Parameters

\Drupal\Core\Extension\Extension $module: The extension of the module to load its file.

1 call to UpdateRegistry::loadUpdateFile()
UpdateRegistry::loadUpdateFiles in core/lib/Drupal/Core/Update/UpdateRegistry.php
Loads all update files for a given list of extension.

File

core/lib/Drupal/Core/Update/UpdateRegistry.php, line 180

Class

UpdateRegistry
Provides all and missing update implementations.

Namespace

Drupal\Core\Update

Code

protected function loadUpdateFile(Extension $module) {
  $filename = $this->root . '/' . $module
    ->getPath() . '/' . $module
    ->getName() . ".{$this->updateType}.php";
  if (file_exists($filename)) {
    include_once $filename;
  }
}