class CertificateRouteProvider in Opigno certificate 8
Same name and namespace in other branches
- 3.x src/CertificateRouteProvider.php \Drupal\opigno_certificate\CertificateRouteProvider
Provides routes for Certificates.
Hierarchy
- class \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider implements EntityHandlerInterface, EntityRouteProviderInterface
- class \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
- class \Drupal\opigno_certificate\CertificateRouteProvider
- class \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
Expanded class hierarchy of CertificateRouteProvider
File
- src/
CertificateRouteProvider.php, line 11
Namespace
Drupal\opigno_certificateView source
class CertificateRouteProvider extends AdminHtmlRouteProvider {
/**
* {@inheritdoc}
*/
public function getCanonicalRoute(EntityTypeInterface $entity_type) {
$route = parent::getCanonicalRoute($entity_type);
$defaults = $route
->getDefaults();
unset($defaults['_entity_view']);
$defaults['_controller'] = '\\Drupal\\opigno_certificate\\Controller\\CertificateController::view';
$route
->setDefaults($defaults);
return $route;
}
}