protected function CleanerSettingsForm::getAllCacheTables in Cleaner 8.2
Same name and namespace in other branches
- 8 src/Form/CleanerSettingsForm.php \Drupal\cleaner\Form\CleanerSettingsForm::getAllCacheTables()
Get list of all cache tables.
Return value
mixed List of all cache tables.
1 call to CleanerSettingsForm::getAllCacheTables()
- CleanerSettingsForm::getCacheTablesTable in src/
Form/ CleanerSettingsForm.php - Get cache tables table.
File
- src/
Form/ CleanerSettingsForm.php, line 130
Class
- CleanerSettingsForm
- Class CleanerSettingsForm.
Namespace
Drupal\cleaner\FormCode
protected function getAllCacheTables() {
$db_name = $this->database
->getConnectionOptions()['database'];
$query = $this->database
->select('INFORMATION_SCHEMA.TABLES', 'tables');
$query
->fields('tables', [
'table_name',
'table_schema',
]);
$query
->condition('table_schema', $db_name);
// We need to do %... because of eventual table prefixes:
$query
->condition('table_name', '%cache_%', 'LIKE');
$query
->condition('table_name', '%cachetags', '<>');
return $query
->execute()
->fetchCol();
}