You are here

class AdminHtmlRouteProvider in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider

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

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

@internal

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
Contains \Drupal\aggregator\FeedHtmlRouteProvider.

File

core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php, line 22
Contains \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider.

Namespace

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

  /**
   * {@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

Namesort descending Modifiers Type Description Overrides
AdminHtmlRouteProvider::getDeleteFormRoute protected function Gets the delete-form route. Overrides DefaultHtmlRouteProvider::getDeleteFormRoute
AdminHtmlRouteProvider::getEditFormRoute protected function Gets the edit-form route. Overrides DefaultHtmlRouteProvider::getEditFormRoute 1
DefaultHtmlRouteProvider::$entityManager protected property The entity 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. 2
DefaultHtmlRouteProvider::getEntityTypeIdKeyType protected function Gets the type of the ID key for a given entity type. 1
DefaultHtmlRouteProvider::getRoutes public function Provides routes for entities. Overrides EntityRouteProviderInterface::getRoutes
DefaultHtmlRouteProvider::__construct public function Constructs a new DefaultHtmlRouteProvider.