install-mysqli.php
Installs the mysqli module on top of a fixture database.
File
-
core/
modules/ system/ tests/ fixtures/ update/ install-mysqli.php
View source
<?php
/**
* @file
* Installs the mysqli module on top of a fixture database.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Install mysqli.
$extensions = $connection->select('config')
->fields('config', [
'data',
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
if ($extensions) {
$data = unserialize($extensions);
$data['module']['mysqli'] = 0;
$connection->update('config')
->fields([
'data' => serialize($data),
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.