function MysqliHooks::runtimeRequirements
Implements hook_runtime_requirements().
Attributes
#[Hook('runtime_requirements')]
File
-
core/
modules/ mysqli/ src/ Hook/ MysqliHooks.php, line 38
Class
- MysqliHooks
- Hook implementations for mysqli.
Namespace
Drupal\mysqli\HookCode
public function runtimeRequirements() : array {
if (!Database::isActiveConnection()) {
return [];
}
$connection = Database::getConnection();
// Only show requirements when MySQLi is the default database connection.
if (!($connection->driver() === 'mysqli' && $connection->getProvider() === 'mysqli')) {
return [];
}
return $this->getRuntimeRequirements($connection);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.