MappingController.php in GatherContent 8.3
File
src/Controller/MappingController.php
View source
<?php
namespace Drupal\gathercontent\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\gathercontent\DAO\Account;
class MappingController extends ControllerBase {
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,
];
}
}