public function AcquiaContentHubUnregisterHelperTrait::checkDiscoveryRoute in Acquia Content Hub 8.2
Checks if Discovery Interface route exists.
Return value
bool TRUE if DI route exists, FALSE otherwise.
2 calls to AcquiaContentHubUnregisterHelperTrait::checkDiscoveryRoute()
- ContentHubDeleteClientConfirmForm::buildForm in src/
Form/ ContentHubDeleteClientConfirmForm.php - Form constructor.
- WebhookDeleteConfirmForm::buildForm in modules/
acquia_contenthub_publisher/ src/ Form/ Webhook/ WebhookDeleteConfirmForm.php - Form constructor.
File
- src/
AcquiaContentHubUnregisterHelperTrait.php, line 20
Class
- AcquiaContentHubUnregisterHelperTrait
- Trait with helper functions for unregistration.
Namespace
Drupal\acquia_contenthubCode
public function checkDiscoveryRoute() : bool {
try {
$route_provider = \Drupal::service('router.route_provider');
$route = $route_provider
->getRouteByName('acquia_contenthub_curation.discovery');
} catch (RouteNotFoundException $exception) {
$route = FALSE;
}
return (bool) $route;
}