diff --git a/src/Entity/FieldInheritance.php b/src/Entity/FieldInheritance.php index a136b4b41cc159315dc7231b3304a2d9b445a98d..6e94ca6ba167f365e95cf4145c30bc95a085e6ac 100644 --- a/src/Entity/FieldInheritance.php +++ b/src/Entity/FieldInheritance.php @@ -18,6 +18,9 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; * "edit" = "Drupal\recurring_events\Form\FieldInheritanceForm", * "delete" = "Drupal\recurring_events\Form\FieldInheritanceDeleteForm" * }, + * "route_provider" = { + * "html" = "Drupal\recurring_events\FieldInheritanceHtmlRouteProvider", + * }, * }, * config_prefix = "field_inheritance", * admin_permission = "administer site configuration", diff --git a/src/FieldInheritanceHtmlRouteProvider.php b/src/FieldInheritanceHtmlRouteProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..dd0fba9ebdcad329ca3195296f0d61a88ca6942b --- /dev/null +++ b/src/FieldInheritanceHtmlRouteProvider.php @@ -0,0 +1,28 @@ +<?php + +namespace Drupal\recurring_events; + +use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; +use Symfony\Component\Routing\Route; + +/** + * Provides routes for Field inheritance entities. + * + * @see Drupal\Core\Entity\Routing\AdminHtmlRouteProvider + * @see Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider + */ +class FieldInheritanceHtmlRouteProvider extends AdminHtmlRouteProvider { + + /** + * {@inheritdoc} + */ + public function getRoutes(EntityTypeInterface $entity_type) { + $collection = parent::getRoutes($entity_type); + + // Provide your custom entity routes here. + + return $collection; + } + +}