public function authorizeInit($page_title) { $authorize_url = Url::
fromUri('base:core/authorize.php',
['absolute' => TRUE
])->
toString();
system_authorized_init('system_test_authorize_run', __DIR__ . '/../../system_test.module',
[],
$page_title);
return new RedirectResponse($authorize_url);
} /**
* Sets a header.
*/
public function setHeader(Request
$request) { $query =
$request->query->
all();
$response =
new CacheableResponse();
$response->headers->
set($query['name'
],
$query['value'
]);
$response->
getCacheableMetadata()->
addCacheContexts(['url.query_args:name', 'url.query_args:value'
]);
$response->
setContent($this->
t('The following header was set: %name: %value',
['%name' =>
$query['name'
], '%value' =>
$query['value'
]]));
return $response;
} /**
* A simple page callback that uses a plain Symfony response object.
*/
public function respondWithResponse(Request
$request) {