public function MappingController::testConnectionPage in GatherContent 8.3
Same name and namespace in other branches
- 8.4 src/Controller/MappingController.php \Drupal\gathercontent\Controller\MappingController::testConnectionPage()
Page callback for connection testing page.
Return value
string Content of the page.
1 string reference to 'MappingController::testConnectionPage'
File
- src/
Controller/ MappingController.php, line 21
Class
- MappingController
- Class MappingController.
Namespace
Drupal\gathercontent\ControllerCode
public function testConnectionPage() {
$account = new Account();
$success = $account
->testConnection();
if ($success === TRUE) {
$message = $this
->t('Connection successful.');
}
else {
$message = $this
->t("Connection wasn't successful.");
}
return [
'#type' => 'markup',
'#markup' => $message,
];
}