public function LivechatController::resetProps in LiveChat 8.3
Method resetProps().
1 string reference to 'LivechatController::resetProps'
File
- src/
Controller/ LivechatController.php, line 119
Class
- LivechatController
- LivechatController class.
Namespace
Drupal\livechat\ControllerCode
public function resetProps(Request $request) {
$settings = $this->configFactory
->getEditable('livechat.settings');
$settings
->set('licence_number', '0')
->save();
$settings
->set('livechat_login', '0')
->save();
$settings
->set('livechat_mobile', '0')
->save();
drupal_flush_all_caches();
return new JsonResponse([
'settings_reset' => 'success',
]);
}