function Updater::getProjectName

Same name in other branches
  1. 9 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getProjectName()
  2. 8.9.x core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getProjectName()
  3. 10 core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getProjectName()
  4. 11.x core/lib/Drupal/Core/Updater/Updater.php \Drupal\Core\Updater\Updater::getProjectName()

Get the name of the project directory (basename).

@todo: It would be nice, if projects contained an info file which could provide their canonical name.

Parameters

string $directory:

Return value

string The name of the project.

1 call to Updater::getProjectName()
Updater::__construct in includes/updater.inc

File

includes/updater.inc, line 175

Class

Updater
Base class for Updaters used in Drupal.

Code

public static function getProjectName($directory) {
    return drupal_basename($directory);
}

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