Update StatusAbstract.php

This commit is contained in:
Dennis Eichhorn 2021-09-20 17:19:26 +02:00 committed by GitHub
parent a0fbf00580
commit 99a9153a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,4 +35,22 @@ use phpOMS\Utils\Parser\Php\ArrayParser;
*/
abstract class StatusAbstract
{
/**
* Deactivate module in database.
*
* @param DatabasePool $dbPool Database instance
* @param ModuleInfo $info Module info
*
* @return void
*
* @since 1.0.0
*/
public static function deactivateInDatabase(DatabasePool $dbPool, ModuleInfo $info) : void
{
$query = new Builder($dbPool->get('update'));
$query->update('app')
->sets('app.app_active', ModuleStatus::INACTIVE)
->where('app.app_id', '=', $info->getInternalName())
->execute();
}
}