1. 8.5.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  2. 8.0.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  3. 8.1.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  4. 8.2.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  5. 8.3.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  6. 8.4.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider
  7. 8.6.x core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php AdminHtmlRouteProvider

Provides HTML routes for entities with administrative add/edit/delete pages.

Use this class if the add/edit/delete form routes should use the administrative theme.

Hierarchy

Expanded class hierarchy of AdminHtmlRouteProvider

See also

\Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider.

1 file declares its use of AdminHtmlRouteProvider
FeedHtmlRouteProvider.php in core/modules/aggregator/src/FeedHtmlRouteProvider.php

File

core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php, line 15

Namespace

Drupal\Core\Entity\Routing
View source
class AdminHtmlRouteProvider extends DefaultHtmlRouteProvider {

  /**
   * {@inheritdoc}
   */
  protected function getAddPageRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getAddPageRoute($entity_type)) {
      $route
        ->setOption('_admin_route', TRUE);
      return $route;
    }
  }

  /**
   * {@inheritdoc}
   */
  protected function getAddFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getAddFormRoute($entity_type)) {
      $route
        ->setOption('_admin_route', TRUE);
      return $route;
    }
  }

  /**
   * {@inheritdoc}
   */
  protected function getEditFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getEditFormRoute($entity_type)) {
      $route
        ->setOption('_admin_route', TRUE);
      return $route;
    }
  }

  /**
   * {@inheritdoc}
   */
  protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getDeleteFormRoute($entity_type)) {
      $route
        ->setOption('_admin_route', TRUE);
      return $route;
    }
  }

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
AdminHtmlRouteProvider::getAddFormRoute protected function Gets the add-form route. Overrides DefaultHtmlRouteProvider::getAddFormRoute
AdminHtmlRouteProvider::getAddPageRoute protected function Gets the add page route. Overrides DefaultHtmlRouteProvider::getAddPageRoute
AdminHtmlRouteProvider::getDeleteFormRoute protected function Gets the delete-form route. Overrides DefaultHtmlRouteProvider::getDeleteFormRoute
AdminHtmlRouteProvider::getEditFormRoute protected function Gets the edit-form route. Overrides DefaultHtmlRouteProvider::getEditFormRoute
DefaultHtmlRouteProvider::$entityFieldManager protected property The entity field manager.
DefaultHtmlRouteProvider::$entityTypeManager protected property The entity type manager.
DefaultHtmlRouteProvider::createInstance public static function Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface::createInstance
DefaultHtmlRouteProvider::getCanonicalRoute protected function Gets the canonical route.
DefaultHtmlRouteProvider::getCollectionRoute protected function Gets the collection route.
DefaultHtmlRouteProvider::getEntityTypeIdKeyType protected function Gets the type of the ID key for a given entity type.
DefaultHtmlRouteProvider::getRoutes public function Provides routes for entities. Overrides EntityRouteProviderInterface::getRoutes
DefaultHtmlRouteProvider::__construct public function Constructs a new DefaultHtmlRouteProvider.