You are here

private static function CleanerSettingsForm::getAllCacheTables in Cleaner 8

Same name and namespace in other branches
  1. 8.2 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 88

Class

CleanerSettingsForm
Class CleanerSettingsForm.

Namespace

Drupal\cleaner\Form

Code

private static function getAllCacheTables() {
  $query = \Drupal::database()
    ->select('INFORMATION_SCHEMA.TABLES', 'tables')
    ->fields('tables', [
    'table_name',
    'table_schema',
  ])
    ->condition('table_schema', \Drupal::database()
    ->getConnectionOptions()['database'])
    ->condition('table_name', 'cache_%', 'LIKE')
    ->condition('table_name', 'cachetags', '<>');
  return $query
    ->execute()
    ->fetchCol();
}