function Updater::__construct

Same name in other branches
  1. 7.x includes/updater.inc \Updater::__construct()
  2. 9 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::__construct()
  3. 10 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::__construct()
  4. 11.x core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::__construct()

Constructs a new updater.

Parameters

string $source: Directory to install from.

string $root: The root directory under which the project will be copied to if it's a new project. Usually this is the app root (the directory in which the Drupal site is installed).

File

core/lib/Drupal/Core/Updater/Updater.php, line 37

Class

Updater
Defines the base class for Updaters used in Drupal.

Namespace

Drupal\Core\Updater

Code

public function __construct($source, $root) {
    $this->source = $source;
    $this->root = $root;
    $this->name = self::getProjectName($source);
    $this->title = self::getProjectTitle($source);
}

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