FakeWorkbenchController.php in Lingotek Translation 3.4.x
Same filename and directory in other branches
- 8.2 tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 4.0.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.0.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.1.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.2.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.3.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.5.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.6.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.7.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
- 3.8.x tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.php
Namespace
Drupal\lingotek_test\ControllerFile
tests/modules/lingotek_test/src/Controller/FakeWorkbenchController.phpView source
<?php
namespace Drupal\lingotek_test\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
/**
* Controller for faking the workbench in the TMS.
*
* @package Drupal\lingotek_test\Controller
*/
class FakeWorkbenchController extends ControllerBase {
/**
* Controller method for the workbench.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request.
*
* @return \Symfony\Component\HttpFoundation\JsonResponse
* A JSON response with the deserialized query string.
*/
public function workbench(Request $request) {
$query = [];
parse_str($request
->getQueryString(), $query);
return new JsonResponse($query);
}
}
Classes
Name | Description |
---|---|
FakeWorkbenchController | Controller for faking the workbench in the TMS. |