kompass/modules/Gruppen/Actions/UpdateGroupAction.php

19 lines
556 B
PHP
Raw Normal View History

<?php
use Bdp\Modules\Gruppen\Controllers\MainController;
class UpdateGroupAction
{
public static function execute(array $newData, int $groupId)
{
global $dbHandler;
if (!current_user_can('edit_groups')) {
kompass_print_message_box(__('You are not allowed to update a group', BDP_LV_PLUGIN_SLUG), 'error');
}
global $dbHandler;
$dbHandler->updateRows(MainController::KOMPASS_STAMMESGRUPPEN_GRUPPEN, $newData, ['id' => $groupId]);
kompass_print_message_box(__('The group was updated.', BDP_LV_PLUGIN_SLUG));
}
}