interface DrupalUpdaterInterface in Drupal 7
Interface for a class which can update a Drupal project.
An Updater currently serves the following purposes:
- It can take a given directory, and determine if it can operate on it.
- It can move the contents of that directory into the appropriate place on the system using FileTransfer classes.
- It can return a list of "next steps" after an update or install.
- In the future, it will most likely perform some of those steps as well.
Hierarchy
- interface \DrupalUpdaterInterface
Expanded class hierarchy of DrupalUpdaterInterface
All classes that implement DrupalUpdaterInterface
File
- includes/
updater.inc, line 21 - 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…
View source
interface DrupalUpdaterInterface {
/**
* Checks if the project is installed.
*
* @return bool
*/
public function isInstalled();
/**
* Returns the system name of the project.
*
* @param string $directory
* A directory containing a project.
*/
public static function getProjectName($directory);
/**
* @return string
* An absolute path to the default install location.
*/
public function getInstallDirectory();
/**
* Determine if the Updater can handle the project provided in $directory.
*
* @todo: Provide something more rational here, like a project spec file.
*
* @param string $directory
*
* @return bool
* TRUE if the project is installed, FALSE if not.
*/
public static function canUpdateDirectory($directory);
/**
* Actions to run after an install has occurred.
*/
public function postInstall();
/**
* Actions to run after an update has occurred.
*/
public function postUpdate();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrupalUpdaterInterface:: |
public static | function | Determine if the Updater can handle the project provided in $directory. | 2 |
DrupalUpdaterInterface:: |
public | function | 2 | |
DrupalUpdaterInterface:: |
public static | function | Returns the system name of the project. | |
DrupalUpdaterInterface:: |
public | function | Checks if the project is installed. | 2 |
DrupalUpdaterInterface:: |
public | function | Actions to run after an install has occurred. | |
DrupalUpdaterInterface:: |
public | function | Actions to run after an update has occurred. |