public static function Updater::getProjectTitle
public static Updater::getProjectTitle($directory)
Return the project name from a Drupal info file.
Parameters
string $directory: Directory to search for the info file.
Return value
string The title of the project.
File
- includes/updater.inc, line 178
- Classes used for updating various files in the Drupal webroot. These classes use a FileTransfer object to actually perform the operations. Normally, the FileTransfer is provided when the site owner is redirected to authorize.php as part of a multistep…
Class
- Updater
- Base class for Updaters used in Drupal.
Code
public static function getProjectTitle($directory) { $info_file = self::findInfoFile($directory); $info = drupal_parse_info_file($info_file); if (empty($info)) { throw new UpdaterException(t('Unable to parse info file: %info_file.', array('%info_file' => $info_file))); } if (empty($info['name'])) { throw new UpdaterException(t("The info file (%info_file) does not define a 'name' attribute.", array('%info_file' => $info_file))); } return $info['name']; }
© 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/includes!updater.inc/function/Updater::getProjectTitle/7.x