file_entity-8.x-2.x-dev/src/Routing/RouteSubscriber.php

src/Routing/RouteSubscriber.php
<?php

namespace Drupal\file_entity\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Listens to the dynamic route events.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  public function alterRoutes(RouteCollection $collection) {
    // The usage view should be shown in the admin theme.
    if ($route = $collection->get('view.file_entity_files.usage')) {
      $route->setOption('_admin_route', TRUE);
    }
  }
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc