Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_routes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_routes
Merge requests
!19
Release 5.0.0
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Release 5.0.0
release_5.0.0
into
master
Overview
0
Commits
9
Changes
1
Merged
Georgi
requested to merge
release_5.0.0
into
master
3 years ago
Overview
0
Commits
9
Changes
1
Expand
0
0
Merge request reports
Viewing commit
4a14b081
Prev
Next
Show latest version
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4a14b081
[BUGFIX] Fixed indentation
· 4a14b081
Georgi Mateev
authored
3 years ago
Classes/Backend/Ajax.php
0 → 100644
+
66
−
0
Options
<?php
namespace
SGalinski\SgRoutes\Backend
;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use
Exception
;
use
Psr\Http\Message\ResponseInterface
;
use
Psr\Http\Message\ServerRequestInterface
;
use
SGalinski\SgRoutes\Exception\SearchOptinHistoryException
;
use
SGalinski\SgRoutes\Service\LicenceCheckService
;
use
SGalinski\SgRoutes\Service\OptinHistoryService
;
use
TYPO3\CMS\Core\Http\Response
;
use
TYPO3\CMS\Extbase\Utility\LocalizationUtility
;
/**
* Class Ajax
*
* @package SGalinski\SgAccount\Backend
*/
class
Ajax
{
/**
* Checks whether the license is valid
*
* @param ServerRequestInterface $request
* @param ResponseInterface $response
* @return ResponseInterface
* @throws \InvalidArgumentException
* @throws Exception
*/
public
function
checkLicense
(
ServerRequestInterface
$request
,
ResponseInterface
$response
=
NULL
)
{
if
(
$response
===
NULL
)
{
$response
=
new
Response
();
}
LicenceCheckService
::
setLastAjaxNotificationCheckTimestamp
();
$responseData
=
LicenceCheckService
::
getLicenseCheckResponseData
(
TRUE
);
$response
->
getBody
()
->
write
(
json_encode
(
$responseData
));
return
$response
;
}
}
Loading