disableCsrfValidation(); } protected function checkInput() { return $this->validateInput([]); } protected function checkPermissions() { return true; } protected function doAction() { CMessageHelper::restoreScheduleMessages(); $data = [ 'theme' => getUserTheme(CWebUser::$data), 'messages' => [] ]; $data['messages'] = CMessageHelper::getMessages(); $data['messages'] = array_map(function (array $message): string { return $message['message']; }, $data['messages']); $this->setResponse(new CControllerResponseData($data)); } }