[TASK] Add return connection function to database utility
This commit is contained in:
parent
444a0e0158
commit
53ac1436db
@ -54,4 +54,16 @@ class DatabaseUtility
|
||||
->createQueryBuilder();
|
||||
return $queryBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a connection for a table and returns it
|
||||
*
|
||||
* @param $tablename string table name
|
||||
* @return object connection
|
||||
*/
|
||||
public static function getConnectionFromTableName($tableName)
|
||||
{
|
||||
return GeneralUtility::makeInstance(ConnectionPool::class)
|
||||
->getConnectionForTable($tableName);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user