ContentBrowserRouteSubscriber.php in Content Browser 8
File
src/Routing/ContentBrowserRouteSubscriber.php
View source
<?php
namespace Drupal\content_browser\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
class ContentBrowserRouteSubscriber extends RouteSubscriberBase {
public function alterRoutes(RouteCollection $collection) {
foreach ([
'entity_browser.browse_content',
'entity_browser.browse_content_iframe',
] as $name) {
if ($route = $collection
->get($name)) {
$route
->setOption('_admin_route', FALSE);
}
}
}
}