class Tasks extends Tasks (View source)

Specifies installation tasks for SQLite databases.

Constants

SQLITE_MINIMUM_VERSION

Minimum required SQLite version.

Use to build sqlite library with json1 option for JSON datatype support.

Properties

protected $pdoDriver {@inheritdoc}
protected array $tasks

Structure that describes each task to run.

from  Tasks
protected array $results

Results from tasks.

from  Tasks

Methods

hasPdoDriver()

Ensure the PDO driver is supported by the version of PHP in use.

from  Tasks
fail($message)

Assert test as failed.

from  Tasks
pass($message)

Assert test as a pass.

from  Tasks
installable()

Check whether Drupal is installable on the database.

from  Tasks
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.

from  Tasks
engineVersionRequirementsCheck()

Checks engine version requirements for the status report.

from  Tasks
connect()

Check if we can connect to the database.

runTestQuery($query, $pass, $fail, $fatal = FALSE)

Run SQL tests to ensure the database can execute commands with the current user.

from  Tasks
checkEngineVersion()

Check the engine version.

from  Tasks
The
getFormOptions(array $database)

Return driver specific configuration options.

An
validateDatabaseSettings($database)

Validates driver specific configuration settings.

from  Tasks
t($string, array $args = [], array $options = [])

Translates a string to the current language or to a given language.

from  Tasks
bool
isConnectionActive()

Determines if there is an active connection.

from  Tasks
getConnection()

Returns the database connection.

from  Tasks

Details

protected hasPdoDriver()

Ensure the PDO driver is supported by the version of PHP in use.

protected fail($message)

Assert test as failed.

Parameters

$message

protected pass($message)

Assert test as a pass.

Parameters

$message

installable()

Check whether Drupal is installable on the database.

name()

Return the human-readable name of the driver.

A minimumVersion()

Return the minimum required version of the engine.

Return Value

A

version string. If not NULL, it will be checked against the version reported by the Database engine using version_compare().

array runTasks()

Run database tasks and tests to see if Drupal can run on the database.

Return Value

array

A list of error messages.

final TranslatableMarkup[] engineVersionRequirementsCheck()

Checks engine version requirements for the status report.

This method is called during runtime and update requirements checks.

Return Value

TranslatableMarkup[]

A list of error messages.

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.

Parameters

$query
$pass
$fail
$fatal

protected checkEngineVersion()

Check the engine version.

The getFormOptions(array $database)

Return driver specific configuration options.

Parameters

array $database

An array of driver specific configuration options.

Return Value

The

options form array.

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.

Parameters

$database

An array of driver specific configuration options.

Return Value

An

array of driver configuration errors, keyed by form element name.

protected t($string, array $args = [], array $options = [])

Translates a string to the current language or to a given language.

Parameters

$string
array $args
array $options

See also

TranslatableMarkup::__construct

protected bool isConnectionActive()

Determines if there is an active connection.

Return Value

bool

TRUE if there is at least one database connection established, FALSE otherwise.

protected Connection getConnection()

Returns the database connection.

Return Value

Connection

The database connection.