TestController.php in Localization client 8
File
l10n_client_test/src/Controller/TestController.php
View source
<?php
namespace Drupal\l10n_client_test\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;
class TestController extends ControllerBase {
public function mockPage() {
$this
->state()
->set('l10n_client_test_mock_request', file_get_contents('php://input'));
$response = Response::create('<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><struct>
<member><name>status</name><value><boolean>1</boolean></value></member>
<member><name>sid</name><value><string>387</string></value></member>
</struct></value>
</param>
</params>
</methodResponse>', 200)
->setSharedMaxAge(300);
$response->headers
->set('Content-Type', 'application/xml');
return $response;
}
}
Classes
Name |
Description |
TestController |
Returns responses for comment module administrative routes. |