public function MappingController::testConnectionPage in GatherContent 8.5
Same name and namespace in other branches
- 8.4 gathercontent_ui/src/Controller/MappingController.php \Drupal\gathercontent_ui\Controller\MappingController::testConnectionPage()
Page callback for connection testing page.
Return value
array Content of the page.
1 string reference to 'MappingController::testConnectionPage'
- gathercontent_ui.routing.yml in gathercontent_ui/
gathercontent_ui.routing.yml - gathercontent_ui/gathercontent_ui.routing.yml
File
- gathercontent_ui/
src/ Controller/ MappingController.php, line 45
Class
- MappingController
- Class MappingController.
Namespace
Drupal\gathercontent_ui\ControllerCode
public function testConnectionPage() {
$message = $this
->t('Connection successful.');
try {
$this->client
->meGet();
} catch (\Exception $e) {
$message = $this
->t("Connection wasn't successful.");
}
return [
'#type' => 'markup',
'#markup' => $message,
];
}