protected function UpdateRegistry::loadUpdateFile

protected UpdateRegistry::loadUpdateFile(Extension $module)

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.

File

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

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;
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Update!UpdateRegistry.php/function/UpdateRegistry::loadUpdateFile/8.1.x