Drupal 8  8.0.2
Module Class Reference
Inheritance diagram for Module:

Public Member Functions

 getInstallDirectory ()
 
 isInstalled ()
 
 getSchemaUpdates ()
 
 postInstallTasks ()
 
 postUpdateTasks ()
 
- Public Member Functions inherited from Updater
 __construct ($source, $root)
 
 update (&$filetransfer, $overrides=array())
 
 install (&$filetransfer, $overrides=array())
 
 prepareInstallDirectory (&$filetransfer, $directory)
 
 makeWorldReadable (&$filetransfer, $path, $recursive=TRUE)
 
 makeBackup (FileTransfer $filetransfer, $from, $to)
 
 getBackupDir ()
 
 postUpdate ()
 
 postInstall ()
 
 postInstallTasks ()
 
 postUpdateTasks ()
 
- Public Member Functions inherited from UpdaterInterface
 postInstall ()
 
 postUpdate ()
 

Static Public Member Functions

static getRootDirectoryRelativePath ()
 
static canUpdateDirectory ($directory)
 
static canUpdate ($project_name)
 
- Static Public Member Functions inherited from Updater
static factory ($source, $root)
 
static getUpdaterFromDirectory ($directory)
 
static findInfoFile ($directory)
 
static getProjectName ($directory)
 
static getProjectTitle ($directory)
 
- Static Public Member Functions inherited from UpdaterInterface
static getProjectName ($directory)
 

Additional Inherited Members

- Data Fields inherited from Updater
 $source
 
- Protected Member Functions inherited from Updater
 getInstallArgs ($overrides=array())
 
- Static Protected Member Functions inherited from Updater
static getExtensionInfo ($directory)
 
- Protected Attributes inherited from Updater
 $root
 

Detailed Description

Defines a class for updating modules using Drupal classes via authorize.php.

Member Function Documentation

static canUpdate (   $project_name)
static

Determines whether this class can update the specified project.

Parameters
string$project_nameThe project to check.
Returns
bool
static canUpdateDirectory (   $directory)
static

{Determines if the Updater can handle the project provided in $directory.

Parameters
string$directory
Returns
bool TRUE if the project is installed, FALSE if not.
}

Implements UpdaterInterface.

getInstallDirectory ( )

Returns the directory where a module should be installed.

If the module is already installed, drupal_get_path() will return a valid path and we should install it there. If we're installing a new module, we always want it to go into /modules, since that's where all the documentation recommends users install their modules, and there's no way that can conflict on a multi-site installation, since the Update manager won't let you install a new module if it's already found on your system, and if there was a copy in the top-level we'd see it.

Returns
string The absolute path of the directory.

Implements UpdaterInterface.

References Module\getRootDirectoryRelativePath(), Module\isInstalled(), and Drupal\root().

Here is the call graph for this function:

static getRootDirectoryRelativePath ( )
static

{Returns the name of the root directory under which projects will be copied.

Returns
string A relative path to the root directory.
}

Implements UpdaterInterface.

Referenced by Module\getInstallDirectory().

Here is the caller graph for this function:

getSchemaUpdates ( )

Returns available database schema updates once a new version is installed.

Returns
array

References drupal_get_schema_versions().

Here is the call graph for this function:

isInstalled ( )

{Checks if the project is installed.

Returns
bool
}

Implements UpdaterInterface.

References Drupal\state().

Referenced by Module\getInstallDirectory().

Here is the call graph for this function:

Here is the caller graph for this function:

postInstallTasks ( )

{}

References Url\fromRoute(), and t().

Here is the call graph for this function:

postUpdateTasks ( )

{}


The documentation for this class was generated from the following file: