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.
Asserts test as failed.
Asserts test as a pass.
Checks whether Drupal is installable on the database.
Returns the human-readable name of the driver.
Returns the minimum required version of the engine.
Runs database tasks and tests to see if Drupal can run on the database.
Checks engine version requirements for the status report.
Checks if we can connect to the database.
Ensures the database can execute commands with the current user.
Checks the engine version.
Returns 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 bool
hasPdoDriver()
Ensure the PDO driver is supported by the version of PHP in use.
protected
fail($message)
Asserts test as failed.
protected
pass($message)
Asserts test as a pass.
bool
installable()
Checks whether Drupal is installable on the database.
abstract string
name()
Returns the human-readable name of the driver.
string|null
minimumVersion()
Returns the minimum required version of the engine.
string[]
runTasks()
Runs 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 bool
connect()
Checks if we can connect to the database.
protected
runTestQuery($query, $pass, $fail, $fatal = FALSE)
Ensures the database can execute commands with the current user.
protected
checkEngineVersion()
Checks the engine version.
array
getFormOptions(array $database)
Returns driver specific configuration options.
TranslatableMarkup[]
validateDatabaseSettings(array $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 TranslatableMarkup
t(string $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.