Tasks
abstract class Tasks (View source)
Database installer structure.
Defines basic Drupal requirements for databases.
Properties
| protected string | $pdoDriver | The name of the PDO driver this database type requires. |
|
| protected array | $tasks | Structure that describes each task to run. |
|
| protected array | $results | Results from tasks. |
Methods
Ensure the PDO driver is supported by the version of PHP in use.
Assert test as failed.
Assert test as a pass.
Check whether Drupal is installable on the database.
Return the human-readable name of the driver.
Return the minimum required version of the engine.
Run database tasks and tests to see if Drupal can run on the database.
Checks engine version requirements for the status report.
Check if we can connect to the database.
Run SQL tests to ensure the database can execute commands with the current user.
Check the engine version.
Return driver specific configuration options.
Validates driver specific configuration settings.
Translates a string to the current language or to a given language.
Determines if there is an active connection.
Returns the database connection.
Details
protected
hasPdoDriver()
Ensure the PDO driver is supported by the version of PHP in use.
protected
fail($message)
Assert test as failed.
protected
pass($message)
Assert test as a pass.
installable()
Check whether Drupal is installable on the database.
abstract
name()
Return the human-readable name of the driver.
A
minimumVersion()
Return the minimum required version of the engine.
array
runTasks()
Run database tasks and tests to see if Drupal can run on the database.
final TranslatableMarkup[]
engineVersionRequirementsCheck()
Checks engine version requirements for the status report.
This method is called during runtime and update requirements checks.
protected
connect()
Check if we can connect to the database.
protected
runTestQuery($query, $pass, $fail, $fatal = FALSE)
Run SQL tests to ensure the database can execute commands with the current user.
protected
checkEngineVersion()
Check the engine version.
The
getFormOptions(array $database)
Return driver specific configuration options.
An
validateDatabaseSettings($database)
Validates driver specific configuration settings.
Checks to ensure correct basic database settings and that a proper connection to the database can be established.
protected
t($string, array $args = [], array $options = [])
Translates a string to the current language or to a given language.
protected bool
isConnectionActive()
Determines if there is an active connection.
protected Connection
getConnection()
Returns the database connection.