public function GdprDatabaseManager::getTableColumns in General Data Protection Regulation 3.0.x
Same name and namespace in other branches
- 8.2 modules/gdpr_dump/src/Service/GdprDatabaseManager.php \Drupal\gdpr_dump\Service\GdprDatabaseManager::getTableColumns()
- 8 modules/gdpr_dump/src/Service/GdprDatabaseManager.php \Drupal\gdpr_dump\Service\GdprDatabaseManager::getTableColumns()
Fetch the tables with their columns.
Return value
array The tables with their columns.
Throws
\Drupal\Core\Database\InvalidQueryException
File
- modules/
gdpr_dump/ src/ Service/ GdprDatabaseManager.php, line 43
Class
- GdprDatabaseManager
- Class GdprDatabaseManager.
Namespace
Drupal\gdpr_dump\ServiceCode
public function getTableColumns() {
$tables = $this->database
->schema()
->findTables('%');
$columns = [];
foreach ($tables as $table) {
$result = $this
->getColumns($table);
if (NULL === $result) {
continue;
}
$columns[$table] = $result
->fetchAll(\PDO::FETCH_ASSOC);
}
return $columns;
}